Francisco Sanchez
/
BlinkM
main.cpp@0:fe4986a8f575, 2009-12-25 (annotated)
- Committer:
- new2mac
- Date:
- Fri Dec 25 08:49:31 2009 +0000
- Revision:
- 0:fe4986a8f575
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
new2mac | 0:fe4986a8f575 | 1 | //This is my fisrt program in mbed trying to light a simple RGB led |
new2mac | 0:fe4986a8f575 | 2 | // WARNING THIS PROGRAM DOES NOT WORK |
new2mac | 0:fe4986a8f575 | 3 | |
new2mac | 0:fe4986a8f575 | 4 | #include "mbed.h" |
new2mac | 0:fe4986a8f575 | 5 | |
new2mac | 0:fe4986a8f575 | 6 | |
new2mac | 0:fe4986a8f575 | 7 | I2C i2c (p28,p27); // Setup the I2C interface: sda, scl |
new2mac | 0:fe4986a8f575 | 8 | |
new2mac | 0:fe4986a8f575 | 9 | int main() { |
new2mac | 0:fe4986a8f575 | 10 | i2c.write(0x00, "c", 1); // Send command string |
new2mac | 0:fe4986a8f575 | 11 | i2c.write(0x00, "0xff", 1); // Send command string |
new2mac | 0:fe4986a8f575 | 12 | i2c.write(0x00, "0xc4", 1); // Send command string |
new2mac | 0:fe4986a8f575 | 13 | i2c.write(0x00, "0x30", 1); // Send command string |
new2mac | 0:fe4986a8f575 | 14 | } |