Blank program for v0.9 API

Dependencies:   PsiSwarmV9 mbed

Fork of PsiSwarm_V8_Blank_CPP by Psi Swarm Robot

Files at this revision

API Documentation at this revision

Comitter:
jah128
Date:
Mon Jun 05 22:47:38 2017 +0000
Parent:
3:53cc107bcff1
Commit message:
Fixed animation

Changed in this revision

PsiSwarmV9.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 53cc107bcff1 -r 3af6e6afbfef PsiSwarmV9.lib
--- a/PsiSwarmV9.lib	Thu Jun 01 23:04:49 2017 +0000
+++ b/PsiSwarmV9.lib	Mon Jun 05 22:47:38 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/Psi-Swarm-Robot/code/PsiSwarmV9/#50686c07ad07
+https://developer.mbed.org/teams/Psi-Swarm-Robot/code/PsiSwarmV9/#3e3b03d80ea3
diff -r 53cc107bcff1 -r 3af6e6afbfef main.cpp
--- a/main.cpp	Thu Jun 01 23:04:49 2017 +0000
+++ b/main.cpp	Mon Jun 05 22:47:38 2017 +0000
@@ -27,7 +27,8 @@
     wait(0.8); // The display is still updating from init so wait a short while
     display.clear_display();
     display.set_position(0,0);
-    display.write_string(" [  No Code   ]");
+    animations.set_colour(1);
+    display.write_string(" [  No Code   ]");   
 }
 
 ///User code loop:  This is where user code should go; it is run as an infinite loop
@@ -61,7 +62,8 @@
     user_code_setup();      ///run user code setup block
     user_code_running = 1;  ///nb. user code can be paused by external commands sent from PC\BT interfaces
     while(1) {
-        user_code_loop();   ///run user code
+        if(user_code_running == 1) user_code_loop();   ///run user code
+        else wait_us(1000);
     }
 }