Introduction: 102 - RBG LED

Here is the second tutorial to get started with the Spark Core, If you are new to the Spark Core and are looking for the Blinking LED tutorial, you can check out tutorial one. In this tutorial I'm dealing with RGB LEDs its one among the things you find in the spark starter kit. This is a fairly simple tutorial (Just making a LED turn red, green, blue,....etc. And the fun part is that you can change the colors over the internet.) and I'm going to make it sound as simple as possible.

If you are looking for a even simpler tutorial I recommend skipping to 101, I got a lot of detailed instruction on how to get started there (If I missed something there leave a comment I will .

So for those of who are reading this let's get started.......

Step 1: Specifications

Here are some specifications about the core.....

Spark Core

  • 8 digital I/O pins, 8 analog I/O pins
  • 8 PWM pins; UART (Serial), SPI, I2C, and JTAG peripherals available
  • Programmed wirelessly (through Spark Cloud), via USB or JTAG
  • 3.3V DC supply voltage (on board power regulator); can be powered by USB Micro
  • 100mA typical current consumption; 300mA peak consumption (during transmit events)
  • 2MB of external flash; EEPROM supplied by CC3000


  • STM32F103 micro-controller
  • ARM Cortex M3 architecture
  • 32-bit 72Mhz processor128KB of Flash, 20KB of RAM

Wi-Fi Module

  • Texas Instruments
  • SimpleLink CC3000802.11b/g
  • Range of 100-300 feet

Here is a link to where you can buy a Spark Core.

Step 2: Getting Started

Again I'm not going to cover all the basic stuff like claiming the core and details about the flashing colors, so if you just got your Core here is a link leading you there. So let's get started make sure you are running the Tinker firmware for this tutorial. Power on your Core and get it connected to the internet.

Get a common anode LED, find the longest terminal among the four and that terminal is the common anode. The common anode is connected to the 3.3V terminal on the Core. And the rest of the terminals are red, blue green. Connect each one to the ground terminal to identify which one is which.

Step 3: Red

Time to turn on red, I got red at digital pin zero. I use the tinker app to set all the pins to High state (This is done through digital write and the click the pin to trigger it ON ot OFF) so the LED turns off and set digital pin 0 to Low to turn the LED Red.

Step 4: Blue and Green

And time for blue, and the pin that I used was digital pin 1, get that low and you get it shining blue. For green I got it at digital pin 2. Got that low and now that is it.

Step 5: Experiment

Get a combination of colors by setting two pins low at a time, and when you get all pins now we get white. For further custom colors try analog pins to set how much intensity each color is to glow. Now it's your time to experiment.