Andy Pomfret
/
UoY-32C-lab1-exercise
Template project for University of York ELE00032C Lab 1
main.cpp
- Committer:
- ajp109
- Date:
- 2021-01-11
- Revision:
- 3:35d45c4dd5d2
- Parent:
- 2:f63cdb6f8a44
File content as of revision 3:35d45c4dd5d2:
#include "mbed.h" int main() { // Initialise the digital pins D2 and D3 as outputs DigitalOut blue(D2); DigitalOut red(D3); // Initialise the digital pin USER_BUTTON (the blue button) as an input DigitalIn button(USER_BUTTON); // Loop forever... while (true) { // Flash the blue LED: on for 100ms, off for 300ms // Your code modifications should be made here blue = true; thread_sleep_for(100); blue = false; thread_sleep_for(300); } }