![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Keg sharing system
Dependencies: 4DGL-uLCD-SE TextLCD mbed
Diff: main.cpp
- Revision:
- 2:7d499335dda5
- Parent:
- 1:f531f70a27c3
- Child:
- 3:861e3433e5e1
diff -r f531f70a27c3 -r 7d499335dda5 main.cpp --- a/main.cpp Thu Dec 08 05:29:44 2016 +0000 +++ b/main.cpp Fri Dec 09 00:21:58 2016 +0000 @@ -19,21 +19,30 @@ Mpr121 keypad ( & i2c , Mpr121::ADD_VSS ) ; // LCD ( tx , rx , reset ) +uLCD_4DGL lcd(p28,p27,p5); // serial tx, serial rx, reset pin; + //uLCD_4DGL lcd( p28 , p27 , p30 ); //uLCD_4DGL lcd( p28 , p27 , p11 ); // text display -// TextLCD lcd ( p22 , p23 , p24 , p25 , p26 , p27 ) ; // rs, e, d4-d7 + +//TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD20x4); // rs, e, d4-d7 +//TextLCD lcd ( p22 , p23 , p24 , p25 , p26 , p27 ) ; // rs, e, d4-d7 // flow meter + + InterruptIn pulse_interrupt ( p5 ) ; + int unsigned pulse_count ( 0 ) ; + void pulse ( ) { ++ pulse_count ; +} + // com.printf ( "PULSE (%d)" , pulse_count ) ; // lcd.locate ( 0 , 4 ) ; // lcd.printf ( "PULSE (%d)" , pulse_count ) ; -} int unsigned pin_count ( 0 ) ; int unsigned pin_value ( 0 ) ; @@ -113,10 +122,19 @@ int main ( ) { + lcd.printf("\nHello uLCD World\n"); //Default Green on black text + lcd.printf("\n Starting Demo..."); +// return 0 ; + pulse_interrupt.rise ( & pulse ) ; + + // ... + +// lcd.locate(0,0); +// lcd.printf("tst"); + // INIT interrupt.fall ( & keypad_callback ) ; interrupt.mode ( PullUp ) ; - pulse_interrupt.rise ( & pulse ) ; // txt.locate ( 0 , 0 ) ; // txt.printf ( "INITT" ) ; // lcd.locate ( 2 , 2 ) ;