Cornfield Cruisers / Mbed 2 deprecated Lab1Motorv1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
pridgejg
Date:
Wed Sep 11 16:41:56 2019 +0000
Parent:
0:ca93a02f0af8
Commit message:
testing repo sync

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Sep 11 16:07:28 2019 +0000
+++ b/main.cpp	Wed Sep 11 16:41:56 2019 +0000
@@ -5,7 +5,7 @@
 Serial bt(PTE0,PTE1);//  Bluetooth
 PwmOut duty(PTA5);// pwm output
 // AnalogIn pot(PTE20); // potentiometer to adjust motor speed
-DigitalOut myled(LED2);
+DigitalOut myled(LED1);
 
 int main() {
     duty.period(0.00005);
@@ -22,10 +22,10 @@
     if(bt.readable()){
         char keyPress = bt.getc();
         if (keyPress == 'u'){ // Pressing the 'u' key increases by 1
-                fakePot = fakePot + .001;
+                fakePot = fakePot + .01;
         }
             else if(keyPress == 'd' && fakePot > 0){ // Pressing the 'D' key decreases by 1
-                fakePot = fakePot -.001;
+                fakePot = fakePot -.01;
                // if(fakePot > 100){
                //     fakePot = 100;
                // }