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.
Fork of MAX11410-test by
Diff: main.cpp
- Revision:
- 1:1cdd12a4efb2
- Parent:
- 0:4f78cdfc99de
- Child:
- 2:39ba9beabf3c
--- a/main.cpp Thu Sep 03 21:51:26 2009 +0000
+++ b/main.cpp Mon Oct 10 21:28:26 2016 +0000
@@ -9,7 +9,7 @@
#include "mbed.h"
-I2C i2c(p9, p10); // sda, scl
+I2C i2c(I2C_SDA, I2C_SCL); // sda, scl
int main() {
printf("I2CU! Searching for I2C devices...\n");
@@ -17,7 +17,7 @@
int count = 0;
for (int address=0; address<256; address+=2) {
if (!i2c.write(address, NULL, 0)) { // 0 returned is ok
- printf(" - I2C device found at address 0x%02X\n", address);
+ printf(" - I2C device found at address 0x%02X\n", address >> 1);
count++;
}
}
