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.
Dependencies: MMA8451Q TSI mbed
Fork of foodcontroller_NoWiFi by
Diff: main.cpp
- Revision:
- 8:047d427da574
- Parent:
- 7:c19655dbdef7
- Child:
- 9:de6dd11d89ba
--- a/main.cpp Fri Jun 10 09:14:01 2016 +0000
+++ b/main.cpp Fri Jun 10 12:05:09 2016 +0000
@@ -41,22 +41,6 @@
bool right; //Right or left? right = 1
bool forward; //Forward or Backward? forward = 1
-/*
-int main()
-{
-
- pc.printf("hello\n\r");
- for(int c=0; c<14;c++)
- {
- pc.printf("work %d\n\r",c);
- rled = 0;
- wait(0.2);
- rled = 1;
- wait(0.2);
- }
-}*/
-
-
void setupWiFi()
{
@@ -220,14 +204,14 @@
pc.printf("Direction = %d \r\n", Direction); //Print the direction variable to screen for debugging
//Only send data to the server if the direction has changed
- if(Direction != PrevDirection || Velocity != PrevVelocity)
+ if(Direction != PrevDirection || Velocity != PrevVelocity)
{
//Send Direction and Velocity to server
- //dev.printf("AT+CIPSEND=0,11\r\n");
+ // dev.printf("AT+CIPSEND=0,11\r\n");
//wait(2);
- dev.printf("1dir%dvel%d\r\n",Direction,Velocity); //Identifier,Direction Tag,Direction Value,Velocity Tag,Velocity Value
+ //dev.printf("1dir%dvel%d\r\n",Direction,Velocity); //Identifier,Direction Tag,Direction Value,Velocity Tag,Velocity Value
PrevDirection = Direction;
PrevVelocity = Velocity;
