Tedd OKANO / Mbed 2 deprecated _training_lpcxpresso_baseboard_led_simple

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
okano
Date:
Tue Feb 16 04:58:22 2010 +0000
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
diff -r 000000000000 -r f1c2852c4f57 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Feb 16 04:58:22 2010 +0000
@@ -0,0 +1,35 @@
+/*
+ *  mbed + LPCXpresso_baseboard demo code
+ *
+ *   This code has been made for a training session. 
+ *
+ *   With this code, the mbed drives PCA9532 to control 16 LEDs. 
+ *
+ *  Copyright (c) 2010 NXP Semiconductors Japan
+ *  Released under the MIT License: http://mbed.org/license/mit
+ *
+ *  revision 1.0  16-Feb-2010   1st release
+ */
+
+#include "mbed.h"
+
+I2C i2c( p28, p27 );        // sda, scl
+
+const int PCA9532_addr  = 0xC0; // define the I2C Address
+
+const char  data[2][5]  = {
+                            { 0x16, 0x00, 0x00, 0x00, 0x00 },
+                            { 0x16, 0x55, 0x55, 0x55, 0x55 }
+                          };
+
+int main() {
+
+    char    i   = 0;
+
+    while ( 1 )
+    {
+        i2c.write( PCA9532_addr, data[ i++ & 0x1 ], 5 );
+        wait( 0.5 );
+    }
+}
+
diff -r 000000000000 -r f1c2852c4f57 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Feb 16 04:58:22 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0