Spark Lights

by thisisrammy in Circuits > LEDs

1027 Views, 4 Favorites, 0 Comments

Spark Lights

DSC02509.JPG

A Spark Core enabled Spark Button.

Kits Required

DSC02195.JPG
DSC02215.JPG
DSC02212.JPG
DSC02490.JPG

A Spark Core (iot)

An USB Data Cable

A Spark Button

Setting Up the Spark Core With the Spark Button

DSC02492.JPG
DSC02493.JPG

The Spark Button comes along with 11 RGB LED's onboard. The Spark core directly fits on the Spark button.

Connecting to the Internet

DSC02495.JPG
DSC02496.JPG

The Spark Core must be connected to the internet in order to upload the codes onto the board. This can be done with the help of the Spark core app.

Writing the Codes

DSC02503.JPG

The codes must be written online (spark.io/build) in the same registered account which was used to connect the Core to the internet.

The codes may look similar to this -

#include "SparkButton/SparkButton.h"

SparkButton b = SparkButton();

void setup() {

b.begin();

}

void loop() {

b.allLedsOn(0,20,20);

}

Once you're done, verify your codes with the online compiler and flash these codes to your Spark Core.

Upload Complete !

DSC02504.JPG
DSC02510.JPG

The LED's illuminate according to your codes. Enjoy the lighting !