-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
michalprusa
committed
Jul 22, 2016
0 parents
commit 30f0528
Showing
87 changed files
with
113,833 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
BlinkM.cpp - Library for controlling a BlinkM over i2c | ||
Created by Tim Koster, August 21 2013. | ||
*/ | ||
#include "Marlin.h" | ||
#ifdef BLINKM | ||
|
||
#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(); | ||
} | ||
|
||
#endif //BLINKM | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
BlinkM.h | ||
Library header file for BlinkM library | ||
*/ | ||
#if (ARDUINO >= 100) | ||
# include "Arduino.h" | ||
#else | ||
# include "WProgram.h" | ||
#endif | ||
|
||
#include "Wire.h" | ||
|
||
void SendColors(byte red, byte grn, byte blu); | ||
|
Oops, something went wrong.