Group 2 PES tuttorial 3 led werkt niet met pot

Dependencies:   FastPWM MODSERIAL mbed HIDScope

main.cpp

Committer:
Roooos
Date:
2018-09-18
Revision:
0:5776e1ab09bd
Child:
1:b7fafbf4aa28

File content as of revision 0:5776e1ab09bd:

#include "mbed.h"
#include "MODSERIAL.h"
#include "FastPWM.h"

DigitalOut ledmbed(LED_RED);
FastPWM led(D8);
InterruptIn butt1(D2);
InterruptIn butt2(D12);
AnalogIn potter(A5);

MODSERIAL pc(USBTX, USBRX);


int main()
{   led = 1;
    ledmbed = 0;
    wait(2); 
    while (true) { 
        led = potter;
        wait (0.1); 
    } 
}