Pages: [1]   Go Down
Author Topic: Simple BlinkM Code  (Read 421 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

Code:
// 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
    }
};

Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6106
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is a BlinkM?

The code you posted just defines a datatype.  I wouldn't expect it to "do" anything.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 30
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://thingm.com/products/blinkm/quick-start-guide.html

You'll have it up and running in minutes.
Logged

Pages: [1]   Go Up
Jump to: