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.
main.cpp
- Committer:
- akudohune
- Date:
- 2013-04-19
- Revision:
- 0:62ac378df546
- Child:
- 1:ed00e9c4ba6e
File content as of revision 0:62ac378df546:
#include "mbed.h"
#include "TextLCD.h"
#include "main.h"
int a;
int xbee;
void init()
{
device.printf("START");
device2.printf("START");
device.attach(&dev_tx,Serial::TxIrq);
device.attach(&dev_rx,Serial::RxIrq);
device2.attach(&dev2_tx,Serial::TxIrq);
device2.attach(&dev2_rx,Serial::RxIrq);
Button.mode(PullUp);
timer2.start();
lcd.cls();
}
int main()
{
init();
for(;;){
//mbedleds = 0;
Ultrasonic();
//lcd.cls();
IR_Position();
lcd.cls();
lcd.locate(0,0);
lcd.printf("R:%d,F:%d",(int)ultrasonicValue[1],(int)ultrasonicValue[0]);
lcd.locate(0,1);
lcd.printf("L:%d,B:%d",(int)ultrasonicValue[3],(int)ultrasonicValue[2]);
/*
lcd.locate(0,0);
lcd.printf("%d",(data[0] << 8) + data[1]);
lcd.locate(0,1);
lcd.printf("%d",data[2]);
*/
/*
lcd.locate(0,0);
lcd.printf("%d,%d",direction,data[2]);
lcd.locate(0,1);
lcd.printf("%d",Distance);
*/
/*
lcd.locate(0,0);
lcd.printf("%d",data[0]);
lcd.locate(0,1);
lcd.printf("%d",data[1]);*/
}
}