Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 314

arduino rosserial with interrupt

$
0
0
Hi all, I'm now building a robot which uses interrupt to count up the number of ticks and do the calculations in arduino nano, after that I decided to use rosserial library to send the number of ticks to the raspberry pi, when I put the code which send the number of ticks inside the void loop function it works, but if I but the code inside the interrupt handler I doesn't work very well and when it work it send strange numbers for example "6074229997415956480" number of ticks . ISR(TIMER1_COMPA_vect){ RTicks_msg.data = EncoderR.GetTicks(); LTicks_msg.data = EncoderL.GetTicks(); RTicksPup.publish(&RTicks_msg); LTicksPup.publish(&LTicks_msg); nh.spinOnce(); } any help ..? thanks,

Viewing all articles
Browse latest Browse all 314

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>