You are viewing an older revision! See the latest version
Introduction
Solve a next few tasks with a goal of getting started with mbed NXP LPC1768 platform:
- Read the introduction to the mbed LPC1768 microcontroller. Check if the latest board firmware is installed. If not, update the firmware to the latest revision using these instructions. Start the Hello World program.
- Examine the documentation for
DigitalOut
class. Turn any LED on/off using classDigitalOut
member functionwrite
. Explain the role ofoperator=
in the class documentation. - Modify the Hello World program to flash other 3 LEDs.
- Modify the program to flash 2 or more LEDs at the same time (almost at the same time).
- Modify the program to flash the LED1 for 4 seconds, then turn off LED1 and flash LED2 for 4 seconds, turn off LED2 and go back to flash LED1 for 4 seconds etc. Use the
while
andfor
loops for this task. - Declare and initialize two constant real variables
T_TOTAL
andT_FLASH
, which will determine the total flash time of individual LEDs from the previous task, as well as the duration of each flash. E.g. instead of 4 seconds, set the total of 10 seconds forT_TOTAL
and instead of default 0.2 seconds forT_FLASH
, set the 0.5 seconds. The idea is to make a change only on those two places, and the rest of the code must carry out the task.
Congratulations!
You have completed all the exercises in the Introduction topic. More interesting exercises are coming in the following topics!
Return to TVZ Mechatronics Team Homepage.