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.
Fork of PsiSwarm-flockingAddedBluetooth by
Diff: main.cpp
- Revision:
- 19:b5788427db67
- Parent:
- 18:3fa5cd53ed45
diff -r 3fa5cd53ed45 -r b5788427db67 main.cpp
--- a/main.cpp Thu Feb 23 09:51:40 2017 +0000
+++ b/main.cpp Wed Mar 01 15:23:47 2017 +0000
@@ -61,6 +61,7 @@
Ticker main_loop_ticker;
+
///This is the main loop for the Beautiful Meme code. The code block is run once every 250mS* [with 4Hz beacon] once all the IR samples have been collected.
void main_loop()
{
@@ -76,6 +77,8 @@
if(use_recharging_program == 1)recharging_program();
update_display();
if(recharging_state == 0) {
+ // remove after testing
+ main_program_state = 8;
switch(main_program_state) {
case 0: //Case 0 is the initial program: turn to face beacon
if(step_cycle == 0) {
@@ -111,6 +114,12 @@
case 7:
tag_game_program();
break;
+ case 8:
+ mockFlocking();
+ break;
+ case 254:
+ init();
+ break;
case 255:
stop_program();
break;
@@ -252,9 +261,7 @@
}
else
{
-/* display.clear_display();
- display.set_position(0,0);
- display.write_string("NOOO!");*/
+
}
}
/// The main routine: it is recommended to leave this function alone and add user code to the above functions
