Chris Styles
/
EA_PCA9532_HelloWorld
Simple Hello World for the PCA9532 on the Embedded Artists Baseboard
main.cpp
- Committer:
- chris
- Date:
- 2010-04-16
- Revision:
- 0:deb3f7947394
- Child:
- 1:bd3f6bfeebac
File content as of revision 0:deb3f7947394:
#include "mbed.h" I2C i2c (p28,p27); int main() { char i2c_data[2]; while (1) { i2c_data[0] = 6; // LS0 register i2c_data[1] = 0x0; // all off i2c.write(0xc0,i2c_data,2); wait(0.2); i2c_data[0] = 6; // LS0 register i2c_data[1] = 0x55; // all ON i2c.write(0xc0,i2c_data,2); wait(0.2); } }