Added various bits, main reformatted. Added .get to class Servo to allow waiting for rotation before recording information.

Dependencies:   SLCD mbed

Fork of Lab6_Basic by ECE 111 At Oregon State University

Committer:
ziadeldebri
Date:
Wed Aug 17 19:07:22 2016 +0000
Revision:
0:61b18b631f94
Child:
3:b787aa49b900
API test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ziadeldebri 0:61b18b631f94 1 #include "mbed.h"
ziadeldebri 0:61b18b631f94 2
ziadeldebri 0:61b18b631f94 3 DigitalOut gpo(D0);
ziadeldebri 0:61b18b631f94 4 DigitalOut led(LED_RED);
ziadeldebri 0:61b18b631f94 5
ziadeldebri 0:61b18b631f94 6 int main()
ziadeldebri 0:61b18b631f94 7 {
ziadeldebri 0:61b18b631f94 8 while (true) {
ziadeldebri 0:61b18b631f94 9 gpo = !gpo; // toggle pin
ziadeldebri 0:61b18b631f94 10 led = !led; // toggle led
ziadeldebri 0:61b18b631f94 11 wait(0.2f);
ziadeldebri 0:61b18b631f94 12 }
ziadeldebri 0:61b18b631f94 13 }