![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
robot S2 pour CE2 avec ROS
Dependencies: mbed rosserial_mbed_lib
Revision 0:939d180d8f7f, committed 2019-10-09
- Comitter:
- jlsalvat
- Date:
- Wed Oct 09 13:54:19 2019 +0000
- Commit message:
- premier test robot S2 CE2
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Oct 09 13:54:19 2019 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +DigitalOut av_ar_G(p12); +DigitalOut av_ar_D(p11); +PwmOut pwm_G(p23); +PwmOut pwm_D(p22); +Serial serial(p13,p14); + +void InitMot(){ + av_ar_G=av_ar_D=0; + pwm_G.pulsewidth_us(0); + pwm_G.period_us(100); + pwm_D.pulsewidth_us(0); + pwm_D.period_us(100); +} + +int main() { + InitMot(); + while(1) { + serial.printf("A\n"); + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Oct 09 13:54:19 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rosserial_mbed_lib.lib Wed Oct 09 13:54:19 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/nucho/code/rosserial_mbed_lib/#684f39d0c346