Fer Pena
/
RobotV1
aaa
Fork of RobotV1 by
main.cpp
- Committer:
- fdopc
- Date:
- 2016-04-06
- Revision:
- 3:07a21d1d16e4
- Parent:
- 2:aae3b2c0881c
- Child:
- 6:9e9143e97bae
File content as of revision 3:07a21d1d16e4:
#include "mbed.h" //AnalogOut r(LED_RED); //AnalogOut b(LED_BLUE); Serial pc(USBTX, USBRX); Serial bt(PTE0, PTE1); char c; int main() { // r=0; // b=0; bt.baud(9600); while(1) { while(!bt.readable()); c = bt.getc(); if(c=='S') { while(!bt.readable()); c = bt.getc(); if(c=='T') { while(!bt.readable()); c = bt.getc(); pc.printf("Axis 1: %d\t\t", c); //r=c/255.0; while(!bt.readable()); c = bt.getc(); pc.printf("Axis 2: %d\n\r", c); //b=c/255.0; } } } }