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
main.cpp@0:1701fc00af69, 2019-10-19 (annotated)
- Committer:
 - jfair
 - Date:
 - Sat Oct 19 10:11:56 2019 +0000
 - Revision:
 - 0:1701fc00af69
 
a
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| jfair | 0:1701fc00af69 | 1 | #include "mbed.h" | 
| jfair | 0:1701fc00af69 | 2 | |
| jfair | 0:1701fc00af69 | 3 | DigitalOut bulb(p17);//defines variable for the bulb and pin its on | 
| jfair | 0:1701fc00af69 | 4 | |
| jfair | 0:1701fc00af69 | 5 | int main() { | 
| jfair | 0:1701fc00af69 | 6 | while(1) {//repats indefnintely | 
| jfair | 0:1701fc00af69 | 7 | bulb = 1;//turns bulb on | 
| jfair | 0:1701fc00af69 | 8 | wait(0.5);//waits 1 second | 
| jfair | 0:1701fc00af69 | 9 | bulb = 0;//turns bulb off | 
| jfair | 0:1701fc00af69 | 10 | wait(0.5);//waits 1 second | 
| jfair | 0:1701fc00af69 | 11 | } | 
| jfair | 0:1701fc00af69 | 12 | } |