Code for Part8

Dependencies:   mbed

Committer:
bjs9
Date:
Wed Jan 31 00:46:52 2018 +0000
Revision:
0:0cae351975b3
Child:
1:ee5499cdec7f
Lab1 part8;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bjs9 0:0cae351975b3 1 #include "mbed.h"
bjs9 0:0cae351975b3 2
bjs9 0:0cae351975b3 3 PwmOut myled(LED1);
bjs9 0:0cae351975b3 4 AnalogIn mypotentiometer(p20);
bjs9 0:0cae351975b3 5 float voltage = 0.0f;
bjs9 0:0cae351975b3 6 int main()
bjs9 0:0cae351975b3 7 {
bjs9 0:0cae351975b3 8 while(1) {
bjs9 0:0cae351975b3 9 voltage = mypotentionmeter
bjs9 0:0cae351975b3 10 myled = mypotentiometer;
bjs9 0:0cae351975b3 11 wait(0.01);
bjs9 0:0cae351975b3 12 }
bjs9 0:0cae351975b3 13 }