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 TTU_CSC1300
main.cpp@0:0926fa95b1f3, 2021-03-21 (annotated)
- Committer:
- rachaeloke
- Date:
- Sun Mar 21 19:54:17 2021 +0000
- Revision:
- 0:0926fa95b1f3
Displayed Hello World
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rachaeloke | 0:0926fa95b1f3 | 1 | /* |
rachaeloke | 0:0926fa95b1f3 | 2 | * Lab #: |
rachaeloke | 0:0926fa95b1f3 | 3 | * Lab Title: |
rachaeloke | 0:0926fa95b1f3 | 4 | * Author(s): |
rachaeloke | 0:0926fa95b1f3 | 5 | * Date: |
rachaeloke | 0:0926fa95b1f3 | 6 | * Purpose: |
rachaeloke | 0:0926fa95b1f3 | 7 | */ |
rachaeloke | 0:0926fa95b1f3 | 8 | |
rachaeloke | 0:0926fa95b1f3 | 9 | #include "mbed.h" |
rachaeloke | 0:0926fa95b1f3 | 10 | #include "TTU_CSC1300.h" |
rachaeloke | 0:0926fa95b1f3 | 11 | |
rachaeloke | 0:0926fa95b1f3 | 12 | //FUNCTION PROTOTYPES GO HERE |
rachaeloke | 0:0926fa95b1f3 | 13 | TextLCD lcd(TextLCD::LCD_CURSOR_ON_BLINKING_ON); |
rachaeloke | 0:0926fa95b1f3 | 14 | |
rachaeloke | 0:0926fa95b1f3 | 15 | int main() |
rachaeloke | 0:0926fa95b1f3 | 16 | { |
rachaeloke | 0:0926fa95b1f3 | 17 | //this while(TRUE) loop keeps the program running |
rachaeloke | 0:0926fa95b1f3 | 18 | while(TRUE) |
rachaeloke | 0:0926fa95b1f3 | 19 | { |
rachaeloke | 0:0926fa95b1f3 | 20 | //blinks "Hello, World!" every other second |
rachaeloke | 0:0926fa95b1f3 | 21 | lcd.printf("Hello, World!"); |
rachaeloke | 0:0926fa95b1f3 | 22 | wait_ms(1000); |
rachaeloke | 0:0926fa95b1f3 | 23 | lcd.cls(); |
rachaeloke | 0:0926fa95b1f3 | 24 | wait_ms(1000); |
rachaeloke | 0:0926fa95b1f3 | 25 | } |
rachaeloke | 0:0926fa95b1f3 | 26 | } |