Miya Miyagawa
/
ColorSensorTest
s
Revision 0:955de0de51fd, committed 2019-09-20
- Comitter:
- Ryosei
- Date:
- Fri Sep 20 05:39:13 2019 +0000
- Commit message:
- sefkua
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SO1602A.lib Fri Sep 20 05:39:13 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/AkinoriHashimoto/code/SO1602A/#e17943b827d8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Sep 20 05:39:13 2019 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "SO1602A.h" + +#define SDA D4 +#define SCL D5 + +#define ReadPin A0 + +I2C i2c(SDA,SCL); +SO1602A oled(i2c,0x78); +AnalogIn Read(ReadPin); +Serial pc(USBTX,USBRX); +int main(){ + oled.init(); + oled.setDispFlag(true,false,false); + oled.printf("Test kun ver1"); + while(1){ + float anal=Read.read(); + oled.locate(0,0); + pc.printf("\n\r%f",anal); + oled.printf("\n%f",anal); + } + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 20 05:39:13 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file