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
Revision 3:6875cf4af4a1, committed 2020-02-24
- Comitter:
- drewantech
- Date:
- Mon Feb 24 14:53:38 2020 +0000
- Parent:
- 2:20562827e8dd
- Commit message:
- Exercise 6
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/main.cpp Mon Feb 24 14:06:14 2020 +0000 +++ b/main.cpp Mon Feb 24 14:53:38 2020 +0000 @@ -1,9 +1,14 @@ #include "mbed.h" /**************************************************************** -In this exercise a bit of if statment use! +In this exercise we will now get onto a new concept called PMW (pulse wirdth modulation) + +this is basicly the use of fast acting digital pins to simulate analoge outputs. -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 -light up. +for this example I would iniitally like you to play with the "wait();" function. +The wait function can take float inputs and so can delay by fractions of a seconds + +write a function that turns on the led then waits a specific amount of time (the argument of the function) and then turns it off again. +place this function only in the main. ***************************************************************/ // these functions initializes the led pins and functions associated with them these are technically c++ but dont worry to much about this yet
