Go Down

Topic: Simple BlinkM Code (Read 1 time) previous topic - next topic


Hey everyone,
     I apologize if this question has been answered a billion times, but I couldn't find it on the forum. (I also didn't really look that hard, so if it has, feel free to flame me.)

     Basically, I'm not a programmer, and I have a BlinkM and just want to program the "hue cycle" with an Arduino (my friend across the hall has one). Looking at the BlinkM data sheet, the id number for the predefined hue cycle sequence is 10. In the datasheet, it leads you to a file for "the exact commands used to produce these light scripts" and below is the command for the script I want. My question is, is this literally all I need to program it (could I just copy and paste this and be done), or is there a bunch of code before/after this script? In the datasheet it shows some more code such as setting the fade speed, time adjust, etc., and that makes sense, but incorporating it all into one program is above me head. Like I said, I'm not a programmer, I've only programmed in Matlab and Fortran (lol), so I have no idea how to program an Arduino. Here is the script I mentioned. Thank you :)

Code: [Select]

// hue cycle
const script fl_script_hue_cycle PROGMEM = {
    7, // number of lines
    0, // number of repeats
        { 30, {'h', 0x00,0xff,0xff}},  // red
        { 30, {'h', 0x2a,0xff,0xff}},  // yellow
        { 30, {'h', 0x54,0xff,0xff}},  // green
        { 30, {'h', 0x7e,0xff,0xff}},  // cyan
        { 30, {'h', 0xa8,0xff,0xff}},  // blue
        { 30, {'h', 0xd2,0xff,0xff}},  // magenta
        { 30, {'h', 0xff,0xff,0xff}},  // red


What is a BlinkM?

The code you posted just defines a datatype.  I wouldn't expect it to "do" anything.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com


If you just want to program the blinkm then follow the instructions on the website


You'll have it up and running in minutes.

Go Up