Software that allows basic remote control of the position of a servo (schematic included in the comments)
Fork of Nucleo_sg90_remote_control by
Diff: main.cpp
- Revision:
- 2:7aacbdf39425
- Parent:
- 1:df2cee74ab8b
- Child:
- 3:91070e0c0431
--- a/main.cpp Mon Jan 30 06:07:59 2017 +0000 +++ b/main.cpp Mon Jan 30 12:29:00 2017 +0000 @@ -13,7 +13,7 @@ //the servo adopt more positions. //Just connect the brown wire of a SG90 servo to GND, its red wire to AVDD and -//its the orange wire to D11 to have the SMT32-F401RE contol the servo. +//its the orange wire to D11 to have the SMT32-F401RE control the servo. // #include "mbed.h" @@ -21,7 +21,7 @@ #define PWM_PERIOD_FOR_SG90_IN_MS 20 DigitalOut userLED(LED1); -PwmOut towerProSG90(D11); //PA_7); +PwmOut towerProSG90(D11); InterruptIn userButton(USER_BUTTON); int index; int pulseDurationInMicroSeconds[]={700, 1550, 2500, 1550};