LedControllerTests

Dependencies:   LedController

Fork of ServomotorTests by NerfUS

main.cpp

Committer:
dupm2216
Date:
2017-02-25
Revision:
1:6e4e8b9d6069
Parent:
0:07953da87c60
Child:
3:47bca612f8ff

File content as of revision 1:6e4e8b9d6069:

#include "RealPwmOut.hpp"
#include "Servomotor.hpp"

int main() 
{
    RealPwmOut pwm_out(p21);;
    Servomotor target(pwm_out);
    
    printf("Test: The servo should go from 0 to 90 degrees, and back to 0\r\n");
    
    while(true)
    {
        target.set_position_down();
        wait_ms(500);
        target.set_position_up();
        wait_ms(500);
    }
    
}