Alonso Angulo / Mbed 2 deprecated motordc2

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers motordc2.cpp Source File

motordc2.cpp

00001 #include "mbed.h"
00002 AnalogIn pot(PTB3);
00003 PwmOut motordc(PTD4);
00004 DigitalOut myled(LED1);
00005 
00006 int main() {
00007     
00008    myled=0;
00009     wait(0.5);
00010     myled=1;
00011 
00012         
00013     while(1) {
00014         float input = pot; 
00015         motordc = input; 
00016         wait(0.1);  
00017         }
00018         
00019 }