CaryCoders
/
demo_SX1276_standalone
standalone sx1276 demo program
Fork of SX1276_GPS by
main.cpp
- Committer:
- vtraveller
- Date:
- 2014-09-02
- Revision:
- 21:c44cfd3259c0
- Parent:
- 20:93c70a1869ee
- Child:
- 22:dd8197db4478
File content as of revision 21:c44cfd3259c0:
#include "mbed.h" #include "Adafruit_RGBLCDShield.h" #include "RTclock.h" #include "DateModule.h" #include "TempModule.h" #include "TimeModule.h" #include "TitleModule.h" #include "SyncModule.h" #include "MenuManager.h" //Serial cPC(SERIAL_TX, SERIAL_RX); int main() { // Share the I2C across multiple devices I2C cI2C(I2C_SDA, I2C_SCL); // D3, D6 cI2C.frequency(400000); // I2C can handle two different frequencies - switch to high speed if asked MCP23017 cMCP23017(cI2C, 0x40); //MCP23017 cMCP23017(cI2C, 0x4E, true); Adafruit_RGBLCDShield cLCD(cMCP23017); //Adafruit_RGBLCDShield cLCD(cMCP23017,1<<0,1<<1, 1<< 2, 1<<4, 1<<5, 1<<6, 1<<7); RTclock cClock(cI2C, RTclock::eDS3231); // Spin up RTC cClock.mapTime(); // Set up display modules Module * aModules[] = { new TempModule(cLCD,cI2C,0x18), new TimeModule(cLCD,cClock), new DateModule(cLCD,cClock), new SyncModule(cLCD,cClock), new TitleModule(cLCD), }; // Set up the menu manager MenuManager cMenuManager(aModules,_countof(aModules),cLCD,16,2); //MenuManager cMenuManager(aModules,_countof(aModules),cLCD,20,4); // Start menu manager loop cMenuManager.loop(); }