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:
- SolalNathan
- Date:
- 2019-05-10
- Revision:
- 1:e4b5a39729d2
- Parent:
- 0:5d6051eeabfe
- Child:
- 2:b2ce001ff8f5
File content as of revision 1:e4b5a39729d2:
#include "mbed.h" #include "math.h" PwmOut pwm_servo(PE_5); PwmOut pwm_moteur(PE_6); Serial pc(SERIAL_TX, SERIAL_RX, 115200); int main(){ // Test du bon fonctionnement de la liaison série pc.printf("Start of the program \n\r"); pc.printf("-------------------- \n\r"); // Initialisation du moteur pwm_moteur.period_ms(20); pwm_moteur.pulsewidth_us(1460); // Intilisation du servo pwm_servo.period_ms(20); pwm_servo.pulsewidth_us(1115); pc.printf("cos(3) = %f", cosf(3)); }