Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:8cb68b6fa38d, committed 2016-10-27
- Comitter:
- anywill
- Date:
- Thu Oct 27 05:06:22 2016 +0000
- Commit message:
- PCF8574
Changed in this revision
diff -r 000000000000 -r 8cb68b6fa38d PCF8574.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PCF8574.lib Thu Oct 27 05:06:22 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/bborredon/code/PCF8574/#6d75da25c179
diff -r 000000000000 -r 8cb68b6fa38d main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 27 05:06:22 2016 +0000 @@ -0,0 +1,29 @@ + +#include "mbed.h" +#include "PCF8574.h" + +PCF8574 io(D14,D15,0x70);//iic 设置:D14 SDA,D15 SCL + +int main() +{ + while(1) + { + io.write(0x0); + if ((io.read()) == 16) + { + io.write(0x01); + } + else if((io.read()) == 32) + { + io.write(0x02); + } + else if((io.read()) == 64) + { + io.write(0x04); + } + else if((io.read()) == 128) + { + io.write(0x08); + } + } +} \ No newline at end of file
diff -r 000000000000 -r 8cb68b6fa38d mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 27 05:06:22 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/25aea2a3f4e3 \ No newline at end of file