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.
Dependencies: mbed
main.cpp
- Committer:
- gtarronge1
- Date:
- 2021-01-19
- Revision:
- 0:d9a5e5f8af4b
File content as of revision 0:d9a5e5f8af4b:
#include "mbed.h" DigitalOut led(LED1); PwmOut pwm(p25); DigitalOut sens1(p10); DigitalOut sens2(p14); Serial pc(USBTX, USBRX, 9600); int main(void) { sens1=1; sens2=0; pwm.period_ms(1); pwm.write(1.0f); Timer timer; timer.start(); while(1) { if(timer.read() > 1.0f) { // sens1 = (sens1==1)?0:1; // sens2 = (sens2==1)?0:1; sens1=!sens1; sens2=!sens2; timer.reset(); } } return 0; }