mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-12-18 08:17:18 +00:00
5b3f60ea2e
If only an LCD is defined and no menu or keyboard defined, there is a compilation error. Added conditional compilation.
30 lines
557 B
C++
30 lines
557 B
C++
/*
|
|
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
|
|
|