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:
- bbbobbbieo
- Date:
- 2015-02-18
- Revision:
- 4:7584ff0426f1
- Parent:
- 3:c7caa058fc50
- Child:
- 5:e7e4f1967fb8
File content as of revision 4:7584ff0426f1:
//#include "mbed.h"
#include "TFC.h"
DigitalOut myled(LED1);
int main()
{
TFC_Init();
float current_servo_position = 0;
while(1)
{
if (TFC_ReadPushButton(0) != 0 )
{
TFC_BAT_LED0_ON;
wait(0.2);
TFC_BAT_LED0_OFF;
wait(0.2);
TFC_SetServo(0, current_servo_position-.05);
}
else
{
TFC_BAT_LED0_ON;
}
if (TFC_ReadPushButton(1) != 0 )
{
TFC_BAT_LED1_ON;
wait(0.2);
TFC_BAT_LED1_OFF;
wait(0.2);
TFC_SetServo(0, current_servo_position+.05);
}
else
{
TFC_BAT_LED1_ON;
}
}
}
//hi guys