Group 2 PES tuttorial 3 led werkt niet met pot

Dependencies:   FastPWM MODSERIAL mbed HIDScope

Committer:
Roooos
Date:
Tue Sep 18 15:32:20 2018 +0000
Revision:
0:5776e1ab09bd
Child:
1:b7fafbf4aa28
tutorial_3_PES_group2 Led wilt niet met Pot1 werken

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Roooos 0:5776e1ab09bd 1 #include "mbed.h"
Roooos 0:5776e1ab09bd 2 #include "MODSERIAL.h"
Roooos 0:5776e1ab09bd 3 #include "FastPWM.h"
Roooos 0:5776e1ab09bd 4
Roooos 0:5776e1ab09bd 5 DigitalOut ledmbed(LED_RED);
Roooos 0:5776e1ab09bd 6 FastPWM led(D8);
Roooos 0:5776e1ab09bd 7 InterruptIn butt1(D2);
Roooos 0:5776e1ab09bd 8 InterruptIn butt2(D12);
Roooos 0:5776e1ab09bd 9 AnalogIn potter(A5);
Roooos 0:5776e1ab09bd 10
Roooos 0:5776e1ab09bd 11 MODSERIAL pc(USBTX, USBRX);
Roooos 0:5776e1ab09bd 12
Roooos 0:5776e1ab09bd 13
Roooos 0:5776e1ab09bd 14 int main()
Roooos 0:5776e1ab09bd 15 { led = 1;
Roooos 0:5776e1ab09bd 16 ledmbed = 0;
Roooos 0:5776e1ab09bd 17 wait(2);
Roooos 0:5776e1ab09bd 18 while (true) {
Roooos 0:5776e1ab09bd 19 led = potter;
Roooos 0:5776e1ab09bd 20 wait (0.1);
Roooos 0:5776e1ab09bd 21 }
Roooos 0:5776e1ab09bd 22 }