Scripting library error...
Hi,
I tried including the BlinkM_nonvol_data.h library into a sketch and I get an error message asking for an initializer before PROGMEM. Anybody know what that should be or how to fix it? This is a library that is supposed to include preprogrammed light scripts, as described in their data sheet.
Thanks.
I tried including the BlinkM_nonvol_data.h library into a sketch and I get an error message asking for an initializer before PROGMEM. Anybody know what that should be or how to fix it? This is a library that is supposed to include preprogrammed light scripts, as described in their data sheet.
Thanks.
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hi Chris,
The "BlinkM_nonvol_data.h" file is part of the the BlinkM firmware and shows the stored ROM light scripts in BlinkM. It's included to show the details of the ROM light scripts and to give you hints on how to implement your own. It's not meant to be used directly in an Arduino sketch. Apologies if that was unclear.
To translate a ROM script to something for use in an Arduino sketch (like BlinkMScriptWriter in the example code zip), copy just the light script lines and make them an array of "blinkm_script_lines". For instance, this:
// R,G,B,R,G,B,....
const script fl_script_rgb PROGMEM = {
3, // number of lines
0, // number of repeats
{
{ 50, {'c', 0xff,0x00,0x00}},
{ 50, {'c', 0x00,0xff,0x00}},
{ 50, {'c', 0x00,0x00,0xff}},
}
};
converts to:
blinkm_script_line script1_lines[] = {
{ 50, {'c', 0xff,0x00,0x00}},
{ 50, {'c', 0x00,0xff,0x00}},
{ 50, {'c', 0x00,0x00,0xff}},
}
int script1_len = 8; // number of script lines above
And then at some point in the Arduino sketch, you would call "BlinkM_writeScript()" to save the script:
BlinkM_writeScript( blinkm_addr, 0, script1_len, 0, script1_lines); -
Inappropriate?Thanks, that helps, but now I'm getting an error message that says "invalid conversion from 'blinkm_script_line*' to 'byte'....
I’m still frustrated
-
Inappropriate?Have you downloaded the latest BlinkM_Examples.zip and tried the "BlinkMScriptWriter" or "BlinkMScriptWriter2" Arduino sketches? Those are two sketches doing pretty much what you're trying to do.
-
Inappropriate?Okay, so I've tried uploading the BlinkMScriptWriter2 sketch to the arduino and I get an error message in the loop section that says it is expecting a ';' before a '}' token. But I don't see any reason for it in the syntax, and when I try putting in a semicolon, I still get an error...
Thanks for your help. -
Inappropriate?Does the original unaltered 'BlinkMScriptWriter2' sketch compile for you? It's hard to tell what exactly is wrong without seeing your entire sketch. Email the sketch you're having problems with to blinkm @ thingm.com and I'll try running it and see what's going on.
Loading Profile...



EMPLOYEE