CaryCoders
/
demo_SX1276_standalone
standalone sx1276 demo program
Fork of SX1276_GPS by
Diff: main.cpp
- Revision:
- 5:6c9ee7e3a20c
- Parent:
- 4:d70e37f6c6bd
- Child:
- 6:a6be2aede8f2
--- a/main.cpp Sat Aug 02 13:50:40 2014 +0000 +++ b/main.cpp Sat Aug 02 14:16:30 2014 +0000 @@ -84,44 +84,31 @@ int main() { pc.printf("\n\rSTART\n\r"); - - // I2C init - //mcp23017.i2c.frequency(400000); - - // Port A is databus - Output - //mcp23017.direction(PORT_A, PORT_DIR_OUT); - - // Port B is controlbus - Output - //mcp23017.direction(PORT_B, PORT_DIR_OUT); - + + // Take MCP out of reset to show its backlight pc.printf("mcp23017.config(0,1,0);\n\r"); mcp23017.config(0,1,0); + + wait(0.5); + + pc.printf("\n\rInitialise LCD\n\r"); + lcd.begin(16,2); + + pc.printf("\n\rShow a letter\n\r"); + lcd._putc('A'); + wait(0.5); - //pc.printf("mcp23017.pinMode\n\r"); - //mcp23017.pinMode(8, DIR_OUTPUT); - //mcp23017.pinMode(7, DIR_OUTPUT); - //mcp23017.pinMode(6, DIR_OUTPUT); - - //SetBacklight(WHITE); - - //wait(0.5); - //pc.printf("MPC Init done\n\r"); - - lcd.begin(16,2); - lcd.display(); - - lcd._putc('A'); - wait(0.5); - + pc.printf("\n\rPrint Hello World\n\r"); lcd.printf("Hello, world!"); lcd.setBacklight(GREEN); + wait(0.5); + + pc.printf("\n\rEntering key tracking loop\n\r"); while (true) { loop(); wait(0.2); - } - - //pc.printf("FINISHED\n\r"); + } }