Øving 4.2

Dependencies:   mbed

Committer:
Smashftw
Date:
Wed Sep 20 13:10:59 2017 +0000
Revision:
0:d13ae82bbadc
?ving 4.2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Smashftw 0:d13ae82bbadc 1 #include "mbed.h"
Smashftw 0:d13ae82bbadc 2
Smashftw 0:d13ae82bbadc 3 PwmOut myled(LED1);
Smashftw 0:d13ae82bbadc 4 AnalogIn potmeter(p20);
Smashftw 0:d13ae82bbadc 5 int main()
Smashftw 0:d13ae82bbadc 6 {
Smashftw 0:d13ae82bbadc 7 myled.period(0.02);
Smashftw 0:d13ae82bbadc 8 while(1) {
Smashftw 0:d13ae82bbadc 9 myled.write(potmeter);
Smashftw 0:d13ae82bbadc 10 wait (0.1);
Smashftw 0:d13ae82bbadc 11 }
Smashftw 0:d13ae82bbadc 12 }
Smashftw 0:d13ae82bbadc 13