Simple Hello World for the PCA9532 on the Embedded Artists Baseboard

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Fri Apr 16 13:28:53 2010 +0000
Child:
1:bd3f6bfeebac
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Apr 16 13:28:53 2010 +0000
@@ -0,0 +1,20 @@
+#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);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Apr 16 13:28:53 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0