Steven Cheldelin
/
empc_pdu_v3
initial commit
Fork of empc_pdu_v3 by
Diff: main.cpp
- Revision:
- 0:d58e47b3cc7e
- Child:
- 1:1686fedb8e0a
diff -r 000000000000 -r d58e47b3cc7e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jun 28 18:29:49 2016 +0000 @@ -0,0 +1,13 @@ +#include "mbed.h" +I2C i2c(D14, D15); // sda, scl +Serial pc(USBTX, USBRX); // tx, rx + +int main() +{ + pc.printf("RUN\r\n"); + for(int i = 0; i < 128 ; i++) { + i2c.start(); + if(i2c.write(i << 1)) pc.printf("0x%x ACK \r\n",i); // Send command string + i2c.stop(); + } +} \ No newline at end of file