Sweep a servo according to Proximity sensor measure

Dependencies:   Servo X_NUCLEO_6180XA1 mbed

Fork of HelloWorld_6180XA1 by ST

main.cpp

Committer:
gallonm
Date:
2015-09-08
Revision:
0:83c628a58feb
Child:
3:ec91a30891d5

File content as of revision 0:83c628a58feb:

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        myled = 1; // LED is ON
        wait(1.0); // 200 ms
        myled = 0; // LED is OFF
        wait(3.0); // 1 sec
    }
}