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:
- ADAMSTRUTT
- Date:
- 2015-08-06
- Revision:
- 2:4dd54b3934a5
- Parent:
- 0:efdae9d24ee1
File content as of revision 2:4dd54b3934a5:
#include "mbed.h" #include <string.h> #include "rtos.h" #include "SpeedCalculate.h" #include "Data.h" #include "UserInput.h" LocalFileSystem local("local"); Serial pc(USBTX, USBRX); //conection to PC Serial mbed2(p9,p10); //conection to mbed2 DigitalOut led_indactor(LED1); Data data; void speed_thread(void const *args) { SpeedCalculate speed; speed.calculate(1,4); } void handShake() { unsigned char input; pc.printf("a\n"); while(true) { input = pc.getc(); if (input == 'a') { led_indactor = 1; break; } } } int main() { int number = 2; //handShake(); // data.initialise(); // while(!(pc.readable() && pc.getc() == 'b')){ // //run // } // Thread sThread(speed_thread); // while(!(pc.readable() && pc.getc() == 's')){ // //run // } // sThread.terminate(); mbed2.printf("%d", number); while(!mbed2.readable()){} mbed2.scanf("%d", &number); pc.printf("%d", number); }