2017 hongo b team
Dependencies: I2C_slave MotorDriver mbed
main.cpp
00001 #include "mbed.h" 00002 00003 #include "Alpha_ApprI2C_ID.h" 00004 #include "ApprI2CSlave.h" 00005 00006 #define SDA PB_7 00007 #define SCL PB_6 00008 00009 Serial pc(USBTX, USBRX); 00010 00011 I2CSlave *slave; 00012 00013 int main() { 00014 slave = new I2CSlave(SDA, SCL); 00015 ApprI2CSlave test(alpha_a::sht_pwr, alpha_a::unsig, alpha_a::s2_addr, slave); 00016 while(1) { 00017 int buff = test.read(); 00018 pc.printf("%d\r\n",buff); 00019 } 00020 }
Generated on Wed Jul 13 2022 20:54:37 by 1.7.2