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
Fork of Exercise6 by
main.cpp@2:20562827e8dd, 2020-02-24 (annotated)
- Committer:
- drewantech
- Date:
- Mon Feb 24 14:06:14 2020 +0000
- Revision:
- 2:20562827e8dd
- Parent:
- 1:245bc5eb1bbe
- Child:
- 3:6875cf4af4a1
Exercise 5
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| drewantech | 0:cb7457d7c822 | 1 | #include "mbed.h" |
| drewantech | 1:245bc5eb1bbe | 2 | /**************************************************************** |
| drewantech | 2:20562827e8dd | 3 | In this exercise a bit of if statment use! |
| drewantech | 1:245bc5eb1bbe | 4 | |
| drewantech | 2:20562827e8dd | 5 | I would like you, whist using the function made in the prevoiuse exercise to make the yellow leds to count in binary and when the number is an odd number the red LED's |
| drewantech | 2:20562827e8dd | 6 | light up. |
| drewantech | 1:245bc5eb1bbe | 7 | ***************************************************************/ |
| drewantech | 0:cb7457d7c822 | 8 | |
| drewantech | 1:245bc5eb1bbe | 9 | // these functions initializes the led pins and functions associated with them these are technically c++ but dont worry to much about this yet |
| drewantech | 1:245bc5eb1bbe | 10 | DigitalOut led1(D5); |
| drewantech | 1:245bc5eb1bbe | 11 | DigitalOut led2(D6); |
| drewantech | 1:245bc5eb1bbe | 12 | DigitalOut led3(D7); |
| drewantech | 1:245bc5eb1bbe | 13 | DigitalOut led4(D8); |
| drewantech | 1:245bc5eb1bbe | 14 | DigitalOut led5(D9); |
| drewantech | 1:245bc5eb1bbe | 15 | DigitalOut led6(D10); |
| drewantech | 1:245bc5eb1bbe | 16 | DigitalOut led7(D11); |
| drewantech | 1:245bc5eb1bbe | 17 | DigitalOut led8(D12); |
| drewantech | 0:cb7457d7c822 | 18 | |
| drewantech | 1:245bc5eb1bbe | 19 | // this is your main function and is where the code starts good luck! |
| drewantech | 0:cb7457d7c822 | 20 | int main() { |
| drewantech | 1:245bc5eb1bbe | 21 | |
| drewantech | 0:cb7457d7c822 | 22 | } |
