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
Diff: main.cpp
- Revision:
- 3:46ea1b20397d
- Parent:
- 2:b2ce001ff8f5
- Child:
- 4:60e7e1c1d1d8
--- a/main.cpp Fri May 10 10:07:11 2019 +0000 +++ b/main.cpp Fri May 10 10:24:01 2019 +0000 @@ -76,7 +76,7 @@ x = direction[0]; y = direction[1]; angle = atan(x/y); - pwm = 14.662756 * angle - 1453.08; // à refaire + pwm = 14.662756 * angle*180/3.14 + 1453.08; // à refaire if (pwm < 1115) printf("trop petit\n\r"); if (pwm > 1625) printf("trop grand\n\r"); @@ -101,12 +101,12 @@ // pwm du Moteur pwm_moteur.period_ms(20); - pwm_moteur.pulsewidth_us(1470); // correspond à une vitesse nulle + pwm_moteur.pulsewidth_us(1400); // correspond à une vitesse nulle // Gaspard : 1450, Solal : 1480. Tester les deux // pwm de la direction pwm_direction.period_ms(20); - pwm_direction.pulsewidth_us(1400); // correspond à un vitesse faible + pwm_direction.pulsewidth_us(1469); // correspond à un vitesse faible // récupération du premier batch de données (7 bytes) du LIDAR lidar.putc(0xA5);