Dependencies: XBeeLib mbed HvZAlphaNumLib HvZServerLib
main.cpp
- Committer:
- etherealflaim
- Date:
- 2010-12-12
- Revision:
- 1:d1b5cd8b2c18
- Parent:
- 0:9cdba0589ba2
File content as of revision 1:d1b5cd8b2c18:
#include "mbed.h" #include "lib/iHvZ.hpp" #include "XBee.hpp" #include "string.h" iHvZ game("TEST_UID"); Serial usb(USBTX, USBRX); DigitalOut human_led(LED1); void dots() { usb.printf("."); } Ticker dotter; int main() { dotter.attach(dots, 10); usb.printf("Starting iHvZ:\r\n"); if (game.load()) { usb.printf(" - Loading state from file\r\n"); } else { usb.printf(" - Starting as ZOMBIE (no file read)\r\n"); //game.life("FAKE_TID"); } game.save(); while(1) { //(game.alphanumdisplay_device()).display('H'); human_led = game.status() == STATUS_HUMAN; wait(.1); } }