standalone sx1276 demo program

Dependencies:   SX1276Lib mbed

Fork of SX1276_GPS by CaryCoders

Committer:
vtraveller
Date:
Thu Aug 14 12:06:47 2014 +0000
Revision:
19:72c02acb601d
Parent:
17:731a47339cb8
Child:
20:93c70a1869ee
Removed dual clock tests

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wim 0:88d87b1c1f8b 1 #include "mbed.h"
vtraveller 13:9641bc42db92 2
vtraveller 4:d70e37f6c6bd 3 #include "Adafruit_RGBLCDShield.h"
vtraveller 10:3fcab08717fc 4 #include "RTclock.h"
vtraveller 10:3fcab08717fc 5
vtraveller 10:3fcab08717fc 6 #include "DateModule.h"
vtraveller 10:3fcab08717fc 7 #include "TempModule.h"
vtraveller 10:3fcab08717fc 8 #include "TimeModule.h"
vtraveller 10:3fcab08717fc 9 #include "TitleModule.h"
vtraveller 17:731a47339cb8 10 #include "SyncModule.h"
wim 0:88d87b1c1f8b 11
vtraveller 13:9641bc42db92 12 #include "MenuManager.h"
vtraveller 10:3fcab08717fc 13
vtraveller 13:9641bc42db92 14 //Serial cPC(SERIAL_TX, SERIAL_RX);
vtraveller 3:ed09f95739df 15
vtraveller 3:ed09f95739df 16 int main()
vtraveller 13:9641bc42db92 17 {
vtraveller 13:9641bc42db92 18 MCP23017 cMCP23017 = MCP23017(I2C_SDA, I2C_SCL, 0x40, true);
vtraveller 13:9641bc42db92 19 Adafruit_RGBLCDShield cLCD(cMCP23017);
vtraveller 17:731a47339cb8 20
vtraveller 19:72c02acb601d 21 RTclock cClock(I2C_SDA, I2C_SCL);
vtraveller 19:72c02acb601d 22 //RTclock cClock(D3, D6);
vtraveller 13:9641bc42db92 23
vtraveller 13:9641bc42db92 24 // Spin up RTC
vtraveller 19:72c02acb601d 25 cClock.mapTime();
vtraveller 17:731a47339cb8 26
vtraveller 10:3fcab08717fc 27 // Set up display modules
vtraveller 10:3fcab08717fc 28 Module * aModules[] =
vtraveller 10:3fcab08717fc 29 {
vtraveller 13:9641bc42db92 30 new TitleModule(cLCD),
vtraveller 17:731a47339cb8 31 new TimeModule(cLCD,cClock),
vtraveller 19:72c02acb601d 32 new DateModule(cLCD,cClock),
vtraveller 13:9641bc42db92 33 new TempModule(cLCD),
vtraveller 19:72c02acb601d 34 new SyncModule(cLCD,cClock),
vtraveller 10:3fcab08717fc 35 };
vtraveller 10:3fcab08717fc 36
vtraveller 13:9641bc42db92 37 // Set up the menu manager
vtraveller 13:9641bc42db92 38 MenuManager cMenuManager(aModules,_countof(aModules),cLCD);
vtraveller 13:9641bc42db92 39
vtraveller 13:9641bc42db92 40 // Start menu manager loop
vtraveller 13:9641bc42db92 41 cMenuManager.loop();
wim 0:88d87b1c1f8b 42 }