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.
Dependencies: SDFileSystem ds3231 eeprom_Nikita mbed testUniGraphic_150217
Fork of merged_code2_3rd_nov_2017 by
Diff: i2c_dec.cpp
- Revision:
- 4:6bd81bb1790d
- Parent:
- 1:8316c23ec6b9
--- a/i2c_dec.cpp Fri Feb 10 10:39:13 2017 +0000
+++ b/i2c_dec.cpp Wed Mar 01 18:49:33 2017 +0000
@@ -1,13 +1,13 @@
#include "mbed.h"
-#define ADDR 0x70
+#define ADDR 0x70 // address of the I2C
void i2c_spec()
{
-I2C i2c(PTC11, PTC10);
+ I2C i2c(PTC11, PTC10);
char dat[1];
- i2c.start();
- dat[0]=0xBB;
- i2c.write(ADDR,dat,1);
- i2c.stop();
+ i2c.start();
+ dat[0]=0xBB;
+ i2c.write(ADDR,dat,1);
+ i2c.stop();
}
\ No newline at end of file
