My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BlinkM.cpp 537B

12345678910111213141516171819202122232425262728
  1. /*
  2. BlinkM.cpp - Library for controlling a BlinkM over i2c
  3. Created by Tim Koster, August 21 2013.
  4. */
  5. #ifdef BLINKM
  6. #if (ARDUINO >= 100)
  7. # include "Arduino.h"
  8. #else
  9. # include "WProgram.h"
  10. #endif
  11. #include "BlinkM.h"
  12. void SendColors(byte red, byte grn, byte blu)
  13. {
  14. Wire.begin();
  15. Wire.beginTransmission(0x09);
  16. Wire.write('o'); //to disable ongoing script, only needs to be used once
  17. Wire.write('n');
  18. Wire.write(red);
  19. Wire.write(grn);
  20. Wire.write(blu);
  21. Wire.endTransmission();
  22. }
  23. #endif //BLINKM