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: C12832 Servo mbed-rtos mbed
Fork of rtos_basic by
Revision 7:c8e192e2c80c, committed 2015-01-19
- Comitter:
- PaulF
- Date:
- Mon Jan 19 13:58:04 2015 +0000
- Parent:
- 6:209f4db62daf
- Child:
- 8:507111cc659c
- Commit message:
- jjj
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Servo.lib Mon Jan 19 13:58:04 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/Servo/#36b69a7ced07
--- a/main.cpp Tue Jun 04 16:01:32 2013 +0100 +++ b/main.cpp Mon Jan 19 13:58:04 2015 +0000 @@ -1,21 +1,25 @@ #include "mbed.h" #include "rtos.h" - -DigitalOut led1(LED1); -DigitalOut led2(LED2); +#include "Servo.h" +Servo s1(p21); +Servo s2(p22); -void led2_thread(void const *args) { +AnalogIn p1(p17); +AnalogIn p2(p20); + + +void p2_thread(void const *args) { while (true) { - led2 = !led2; + s2 = p1*5; Thread::wait(1000); } } int main() { - Thread thread(led2_thread); + Thread thread(p2_thread); while (true) { - led1 = !led1; + s1 = p1*5; Thread::wait(500); } }
--- a/mbed-rtos.lib Tue Jun 04 16:01:32 2013 +0100 +++ b/mbed-rtos.lib Mon Jan 19 13:58:04 2015 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/mbed_official/code/mbed-rtos/ \ No newline at end of file +https://mbed.org/users/mbed_official/code/mbed-rtos/#9387d4c49609
--- a/mbed.bld Tue Jun 04 16:01:32 2013 +0100 +++ b/mbed.bld Mon Jan 19 13:58:04 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/ \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file