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: AdaFruit_RGBLCDShield MCP23017 mbed RTclock
Fork of MCP_test by
main.cpp
00001 #include "mbed.h" 00002 00003 #include "lcdadafruit.h" 00004 #include "lcd2004.h" 00005 #include "keyreaderadafruit.h" 00006 #include "keyreadernull.h" 00007 #include "RTclock.h" 00008 00009 #include "DateModule.h" 00010 #include "TempModule.h" 00011 #include "TimeModule.h" 00012 #include "TitleModule.h" 00013 #include "SyncModule.h" 00014 00015 #include "MenuManager.h" 00016 00017 int main() 00018 { 00019 // Share the I2C across multiple devices 00020 I2C cI2C(I2C_SDA, I2C_SCL); // D3, D6 00021 cI2C.frequency(400000); // I2C can handle two different frequencies - switch to high speed if asked 00022 00023 //LCDadafruit cLCD(cI2C); 00024 LCD2004 cLCD(cI2C); 00025 //KeyReaderNull cKeys(cI2C); 00026 KeyReaderAdafruit cKeys(cI2C); 00027 00028 RTclock cClock(cI2C, 0x68 << 1, RTclock::eDS3231); 00029 00030 // Spin up RTC 00031 cClock.mapTime(); 00032 00033 // Set up display modules 00034 Module * aModules[] = 00035 { 00036 new TitleModule(cLCD,cClock), 00037 new TempModule(cLCD,cI2C,0x18 << 1), 00038 new TimeModule(cLCD,cClock), 00039 new DateModule(cLCD,cClock), 00040 new SyncModule(cLCD,cClock), 00041 }; 00042 00043 // Set up the menu manager 00044 // MenuManager cMenuManager(aModules,_countof(aModules),cLCD,cKeys,16,2); 00045 MenuManager cMenuManager(aModules,_countof(aModules),cLCD,cKeys); 00046 00047 // Start menu manager loop 00048 cMenuManager.loop(); 00049 }
Generated on Thu Jul 14 2022 00:55:23 by
1.7.2
