Test PCF8574 chips with leds

Dependencies:   mbed PCF8574

Files at this revision

API Documentation at this revision

Comitter:
dscarnatto
Date:
Mon Jul 22 01:29:04 2019 +0000
Commit message:
Test PCF8574 with leds and PCF8574 Lib

Changed in this revision

PCF8574.lib Show annotated file Show diff for this revision Revisions of this file
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 759957225002 PCF8574.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PCF8574.lib	Mon Jul 22 01:29:04 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Bas/code/PCF8574/#7913586369c2
diff -r 000000000000 -r 759957225002 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jul 22 01:29:04 2019 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "pcf8574.h"
+
+
+
+I2C _i2c(D14, D15);// (sda,scl)
+
+
+int main()
+{
+ //Inicializamos 
+ PCF8574 pcf(&_i2c,0x00,PCF8574_TYPE);
+ unsigned char dato;
+ dato = 0x01;
+ while(1)
+ {
+    pcf.WriteByte(dato);
+    wait(0.5);
+    if (dato == 0x80) dato = 0x01;
+    dato = (dato << 1);
+       
+ }   
+    
+}    
\ No newline at end of file
diff -r 000000000000 -r 759957225002 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jul 22 01:29:04 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file