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: mbed PulseSensor2 SCP1000 mbed-rtos 4DGL-uLCD-SE LSM9DS1_Library_cal PinDetect FatFileSystemCpp GP-20U7
main.cpp@2:0c1c9795bfc4, 2020-03-25 (annotated)
- Committer:
- Richard_Xiong
- Date:
- Wed Mar 25 19:04:16 2020 +0000
- Revision:
- 2:0c1c9795bfc4
- Parent:
- 0:ae05ad9e2610
- Child:
- 5:874e0af6fb50
Show steps on LCD
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| dyu2021 | 0:ae05ad9e2610 | 1 | #include "mbed.h" |
| dyu2021 | 0:ae05ad9e2610 | 2 | |
| Richard_Xiong | 2:0c1c9795bfc4 | 3 | uLCD_4DGL uLCD(p28, p27, p30); |
| Richard_Xiong | 2:0c1c9795bfc4 | 4 | |
| Richard_Xiong | 2:0c1c9795bfc4 | 5 | int Steps; |
| Richard_Xiong | 2:0c1c9795bfc4 | 6 | |
| dyu2021 | 0:ae05ad9e2610 | 7 | |
| dyu2021 | 0:ae05ad9e2610 | 8 | int main() { |
| Richard_Xiong | 2:0c1c9795bfc4 | 9 | uLCD.display_control(PORTRAIT); |
| Richard_Xiong | 2:0c1c9795bfc4 | 10 | uLCD.cls(); |
| Richard_Xiong | 2:0c1c9795bfc4 | 11 | uLCD.baudrate(BAUD_3000000); |
| Richard_Xiong | 2:0c1c9795bfc4 | 12 | uLCD.background_color(BLACK); |
| Richard_Xiong | 2:0c1c9795bfc4 | 13 | uLCD.cls(); |
| Richard_Xiong | 2:0c1c9795bfc4 | 14 | wait(0.5); |
| Richard_Xiong | 2:0c1c9795bfc4 | 15 | |
| Richard_Xiong | 2:0c1c9795bfc4 | 16 | while (1) { |
| Richard_Xiong | 2:0c1c9795bfc4 | 17 | uLCD.printf("Your steps right now is %d",steps); |
| Richard_Xiong | 2:0c1c9795bfc4 | 18 | |
| dyu2021 | 0:ae05ad9e2610 | 19 | } |
| Richard_Xiong | 2:0c1c9795bfc4 | 20 | |
| dyu2021 | 0:ae05ad9e2610 | 21 | } |

