tommasta

I2C command for Rainbowdash **Compiles, does not work**

Apr 14th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <Wire.h>
  2.  
  3. void setup()
  4. {
  5.   Wire.begin();              // join i2c bus
  6. }
  7.  
  8. void loop()
  9. {
  10.   Wire.beginTransmission(4); // transmit to device #4
  11.     Wire.write(0x52);        //Transmit SHOW_COLOR command, white screen
  12.     Wire.write(0x03);
  13.     Wire.write(0x0F);
  14.     Wire.write(0xFF);
  15.     Wire.write((byte)0x00);  //(byte) included to remove ambiguity in command
  16.    Wire.endTransmission();   // stop transmitting
  17. }
Advertisement
Add Comment
Please, Sign In to add comment