You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
504 B
C++
24 lines
504 B
C++
11 years ago
|
/*
|
||
|
BlinkM.cpp - Library for controlling a BlinkM over i2c
|
||
|
Created by Tim Koster, August 21 2013.
|
||
|
*/
|
||
|
#if (ARDUINO >= 100)
|
||
|
# include "Arduino.h"
|
||
|
#else
|
||
|
# include "WProgram.h"
|
||
|
#endif
|
||
|
#include "BlinkM.h"
|
||
|
|
||
|
void SendColors(byte red, byte grn, byte blu)
|
||
|
{
|
||
|
Wire.begin();
|
||
|
Wire.beginTransmission(0x09);
|
||
|
Wire.write('o'); //to disable ongoing script, only needs to be used once
|
||
|
Wire.write('n');
|
||
|
Wire.write(red);
|
||
|
Wire.write(grn);
|
||
|
Wire.write(blu);
|
||
|
Wire.endTransmission();
|
||
|
}
|
||
|
|