Resetting a BlinkM
I tried to reset by BlinkM so that it runs the default script. This isn't quite right. Perhaps someone can offer a better set of values.
May I ask that we get a Reset.pde in the example scripts?
Todbot's rule #1, ya know....
------------------------------
#include "Wire.h"
#include "BlinkM_funcs.h"
void setup()
{
byte blinkm_addr = 0x09;
blinkm_script_line script_lines[] = {
{ 1, {'f', 10,0x00,0x00 }}, // set fade speed
{ 1, {'t', 127,0x00,0x00 }}, // set time adjust
{ 1, {'c', 0xff,0xff,0xff }}, // fade to white
{ 1, {'c', 0xff,0, 0 }}, // fade to red
{ 1, {'c', 0, 0xff,0 }}, // fade to green
{ 1, {'c', 0, 0, 0xff }}, // fade to blue
{ 1, {'c', 0, 0, 0 }}, // fade to BLACK
};
byte script_id = 0; // can only write to script 0
byte script_len = 7; // number of lines in script
byte script_rep = 10;
BlinkM_beginWithPower();
// comment this out if you don't want to reset the address of your BlinkM
BlinkM_setAddress( blinkm_addr );
Serial.begin(19200);
byte rc = BlinkM_checkAddress( blinkm_addr );
if( rc == -1 )
Serial.println("\r\nno response");
else if( rc == 1 )
Serial.println("\r\naddr mismatch");
Serial.println("writing script...");
BlinkM_writeScript( blinkm_addr, script_id, script_len ,script_rep,
script_lines );
}
void loop()
{
}
May I ask that we get a Reset.pde in the example scripts?
Todbot's rule #1, ya know....
------------------------------
#include "Wire.h"
#include "BlinkM_funcs.h"
void setup()
{
byte blinkm_addr = 0x09;
blinkm_script_line script_lines[] = {
{ 1, {'f', 10,0x00,0x00 }}, // set fade speed
{ 1, {'t', 127,0x00,0x00 }}, // set time adjust
{ 1, {'c', 0xff,0xff,0xff }}, // fade to white
{ 1, {'c', 0xff,0, 0 }}, // fade to red
{ 1, {'c', 0, 0xff,0 }}, // fade to green
{ 1, {'c', 0, 0, 0xff }}, // fade to blue
{ 1, {'c', 0, 0, 0 }}, // fade to BLACK
};
byte script_id = 0; // can only write to script 0
byte script_len = 7; // number of lines in script
byte script_rep = 10;
BlinkM_beginWithPower();
// comment this out if you don't want to reset the address of your BlinkM
BlinkM_setAddress( blinkm_addr );
Serial.begin(19200);
byte rc = BlinkM_checkAddress( blinkm_addr );
if( rc == -1 )
Serial.println("\r\nno response");
else if( rc == 1 )
Serial.println("\r\naddr mismatch");
Serial.println("writing script...");
BlinkM_writeScript( blinkm_addr, script_id, script_len ,script_rep,
script_lines );
}
void loop()
{
}
1
person likes this idea
I like this idea!
Tell me when this idea gets some attention.
The more people who like this idea, the more it gets noticed.
The more people who like this idea, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?This question has been answered here:
http://getsatisfaction.com/thingm/topics/fatory_settings_for_blinkm
Loading Profile...



EMPLOYEE