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.
main.cpp
- Committer:
- s1574396
- Date:
- 2018-10-31
- Revision:
- 0:01afb35ba995
- Child:
- 1:9b3491c0f6b8
File content as of revision 0:01afb35ba995:
#include "mbed.h"
#include "Servo.h"
//Ticker servo;
//void signal_servo(){}
Servo myservo(D7);
DigitalIn but_1(SW2);
void servocontrol()
{
if (but_1)
{
myservo = 0.1;
}
else
{
myservo = 0.0;
}
}
int main()
{
while (1)
{
servocontrol();
wait(0.01);
}
}