![](/media/cache/profiles/nikki.png.50x50_q85.jpg)
I2C_2 bus scanner for STM32L476RG.
Diff: main.cpp
- Revision:
- 4:ad1195c10812
- Parent:
- 3:8def8fb70765
- Child:
- 5:a4fddd74263c
--- a/main.cpp Mon Mar 21 02:31:19 2016 +0000 +++ b/main.cpp Mon Mar 21 04:06:14 2016 +0000 @@ -25,9 +25,9 @@ DigitalOut myled(LED1); +int ack; void scanI2C() { - int address; - int ack; + int address; for(address=1;address<127;address++) { ack = i2c.write(address, "11", 1); if (ack == 0) {