2017 hongo b team
Dependencies: I2C_slave MotorDriver mbed
main.cpp
- Committer:
- Komazawa_sun
- Date:
- 2017-09-08
- Revision:
- 1:d00affd925c2
- Parent:
- 0:2c99fa8dad2a
File content as of revision 1:d00affd925c2:
#include "mbed.h" #include "Alpha_ApprI2C_ID.h" #include "ApprI2CSlave.h" #define SDA PB_7 #define SCL PB_6 Serial pc(USBTX, USBRX); I2CSlave *slave; int main() { slave = new I2CSlave(SDA, SCL); ApprI2CSlave test(alpha_a::sht_pwr, alpha_a::unsig, alpha_a::s2_addr, slave); while(1) { int buff = test.read(); pc.printf("%d\r\n",buff); } }