Starting with Bling

Spartronics has two projects for introducing Arduino development using bling.

Important: If this is your first time diving into Arduino, make sure to walk through Ladyada's Learn Arduino Tutorialsarrow-up-right. Also, there are many good tutorials on YouTube, such as this onearrow-up-right

Bling Demo

Introduction to bling development uses Adafruit NeoPixel strip and ring components. Demo board also has a potentiometer for demonstrating sensor interaction.

Setup

For sketch code and hardware requirements see BlingDemoSystem Repoarrow-up-right

Learning Path

Also see Arduino Tutorialarrow-up-right for reference.

Exercises and Code Experiments

  • Understand RGB and pixel numbering by changing the setup() code on how the strip/ring is initialized.

    Experiment with online RGB colorsarrow-up-right and see how they perform on the NeoPixel.

  • Write new functions for different blink patterns:

    • rainbow

    • use potentiometer to change intensity of the leds without changing

      the blink pattern

    • use potentiometer to control the number of pixels change color on

      the strip: 0 everything off to 255 all pixels are on

  • Change blink rates and experiment with using light on/off as a

    communication tool.

Adafruit NeoPixel Documentation

See Adafruit NeoPixel Uberguidearrow-up-right for documentation on how to use the library.

Key sections:

  • Include library: #include <Adafruit_Neopixel.h>

  • Specify LED_PIN and LED_COUNT

  • Declare Adafruit_NeoPixel object -- can be a ring or a strip

  • When using the NeoPixel function, make sure to specify the

    Adafruit_NeoPixel object

  • In setup() function call begin() to prepare data pin NeoPixel output

  • Common commands -- don't forget to specify the NeoPixel object in the command strip.clear()

    • LED pixels numbered along the strip starting from 0 closest to the

      Arduino board

    • setting pixel colors:

      • setPixelColor(pixel_number, R, G, B) and RGB brightness levels

        -- 0 is dimmest (off) and 255 max brightest

      • setPixelColor(pixel_number, color) where color is a 32-bit

        type that represents RGB

      • fill() function to set same color to multiple pixels

      • clear() function to turn off all pixels to 0 brightness

      • getPixelColor() to query existing pixel value

      • setBrightness() to specify brightness level of all pixels

  • show() to push the color data to the NeoPixel object, otherwise

    color changes will not be displayed

Bling Code Samples

Last updated

Was this helpful?