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: XBeeLib mbed HvZAlphaNumLib HvZServerLib
main.cpp
00001 #include "mbed.h" 00002 #include "lib/iHvZ.hpp" 00003 #include "XBee.hpp" 00004 #include "string.h" 00005 00006 iHvZ game("TEST_UID"); 00007 Serial usb(USBTX, USBRX); 00008 DigitalOut human_led(LED1); 00009 00010 void dots() { 00011 usb.printf("."); 00012 } 00013 00014 Ticker dotter; 00015 00016 int main() { 00017 dotter.attach(dots, 10); 00018 00019 usb.printf("Starting iHvZ:\r\n"); 00020 00021 if (game.load()) 00022 { 00023 usb.printf(" - Loading state from file\r\n"); 00024 } 00025 else 00026 { 00027 usb.printf(" - Starting as ZOMBIE (no file read)\r\n"); 00028 //game.life("FAKE_TID"); 00029 } 00030 game.save(); 00031 00032 while(1) 00033 { 00034 //(game.alphanumdisplay_device()).display('H'); 00035 human_led = game.status() == STATUS_HUMAN; 00036 wait(.1); 00037 } 00038 }
Generated on Wed Jul 13 2022 16:17:46 by
1.7.2