big box testing

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
kzampag
Date:
Fri Aug 02 22:32:07 2013 +0000
Commit message:
I2c working on board except for larger values

Changed in this revision

I2CTester.cpp Show annotated file Show diff for this revision Revisions of this file
PCF8575.lib 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 feff35de571d I2CTester.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/I2CTester.cpp	Fri Aug 02 22:32:07 2013 +0000
@@ -0,0 +1,49 @@
+#include "mbed.h"
+#include "PCF8575.h"
+
+Serial pc(USBTX, USBRX); // tx, rx
+
+//SETUP AND INITIAL DEFINITION
+PCF8575 IC(p9, p10, 0x40);          // 0x40 means the A0-2 is LOW
+PCF8575 IC2(p9, p10, 0x44);         // 0x42 means the A0 is HIGH and A1-2 is LOW
+DigitalOut myled(LED1);
+
+char seventeen = 0xFF00;
+int sixteen = 0x4000;
+int fifteen = 0x2000;
+int fourteen = 0x1000;
+int thirteen = 0x0800;
+int twelve = 0x0400;
+int eleven = 0x0200;
+int ten = 0x0100;
+int seven = 0x0080;
+int six = 0x0040;
+int five = 0x0020;
+int four = 0x0010;
+int three = 0x0008;
+int two = 0x0004;
+int one = 0x0002;
+int zero = 0x0001;  
+
+
+int main()
+{
+    pc.printf("Start");
+    while (1) {
+        IC.write(seventeen);
+        IC.write(zero); 
+         
+        
+        //IC2.write(0xFFFF);
+        myled = 1;
+          
+   
+        wait(1);
+
+        IC.write(0x0000);
+        //IC2.write(0x0000);
+        myled=0;
+        wait(1);
+  
+    }
+}
diff -r 000000000000 -r feff35de571d PCF8575.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PCF8575.lib	Fri Aug 02 22:32:07 2013 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/Lerche/code/PCF8575/#e5bb35ac2c61
diff -r 000000000000 -r feff35de571d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Aug 02 22:32:07 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17
\ No newline at end of file