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.
Diff: main.cpp
- Revision:
- 5:4585215afd11
- Parent:
- 4:40bb33497de4
- Child:
- 6:a9a03663fa23
diff -r 40bb33497de4 -r 4585215afd11 main.cpp --- a/main.cpp Sat Mar 23 02:18:38 2019 +0000 +++ b/main.cpp Sat Mar 23 03:31:56 2019 +0000 @@ -1,15 +1,19 @@ #include "mbed.h" #include <HX711.h> #include <eeprom.h> -#include "digitLCD.h" +//#include "digitLCD.h" +#include "SB1602E.h" +#define LCD_1602 +SB1602E lcd( PB_9, PB_8 ); // SDA, SCL CAN can1(PD_0, PD_1); CAN can2(PB_5, PB_6); DigitalOut led1(LED1); DigitalOut led2(LED2); //FlashIAP flashIAP; -digitLCD lcd(PA_5,PA_4,PB_5); // WO, CS, DATA +//#define LCD_1621 +//digitLCD lcd(PA_5,PA_4,PB_5); // WO, CS, DATA #define EEPROM_ADDR 0x0 // I2c EEPROM address is 0x00 @@ -521,10 +525,17 @@ int main() { wait(1); + #ifdef LCD_1621 lcd.clear(); // clears display lcd.allsegson(); + // lcd.printf("ABCDEFGHI"); // Standard printf function, All ASCII characters will display +#endif printf("\n\n*** RTOS basic example ***\r\n"); +#ifdef LCD_1602 + lcd.printf( 0, "Hello world!" ); // line# (0 or 1), string + lcd.printf( 1, "pi = %.6f", 3.14159265 ); +#endif init_scale(); thread.start(print_thread);