Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Revision 1:4f7125fad4f8, committed 2019-09-11
- 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; // }