public
Created

  • Download Gist
XbeeBlinkM
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#include <Wire.h>
#include "BlinkM_funcs.h"
 
#define blinkm_addr 0x00
 
int val;
 
void setup(){
Serial.begin(9600);
pinMode(13,OUTPUT);
BlinkM_beginWithPower();
BlinkM_stopScript( blinkm_addr ); // turn off startup script
}
 
void loop(){
if(Serial.available()>0){
val=Serial.read();
}
if(val=='H'){
BlinkM_fadeToRGB(blinkm_addr,0xff,0xff,0xff);
digitalWrite(13,HIGH);
}else{
BlinkM_fadeToRGB(blinkm_addr,0x00,0x00,0x00);
digitalWrite(13,LOW);
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.