taiyou komazawa / Mbed 2 deprecated 2017_Bteam_I2CTransporter

Dependencies:   DataPool mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 #include "BetaTransporter.h"
00004 #include "GammaTransporter.h"
00005 #include "DataPool.h"
00006 
00007 Serial pc(USBTX,USBRX);
00008 
00009 int main() {
00010     //DataPool *beta;
00011     DataPool *gamma;
00012     
00013     //beta = new BetaTransporter;
00014     gamma = new GammaTransporter;
00015     
00016     while(1) {
00017         //beta->set();
00018         gamma->set();
00019         
00020         //pc.printf("%d\r\n",beta->read(1));
00021         pc.printf("%d,%d,%d\r\n",gamma->read(0),gamma->read(1),gamma->read(2));
00022         
00023         wait(0.05);
00024     }
00025 }