rosserial wire
Hello everyone.
I can't seem to be able to use Wire.h in arduino with the rosserial library. Each time I try, I get this message :
[WARN] [WallTime: 1395811454.890221] Serial Port read returned short (expected 1 bytes, received 0 instead).
[WARN] [WallTime: 1395811454.891349] Serial Port read failure:
[ERROR] [WallTime: 1395803426.139769] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino
I admit, I have both groovy and hydro on my computer but I installed the ros library using rosserial in groovy with grovvy sourced and right now I'm using groovy and not hydro. Here are all the source and command I use on setup :
alias groovy='source /opt/ros/groovy/setup.bash && source /home/ros/catkin_ws/devel/setup.bash && export EDITOR='nano' && export ROS_PACKAGE_PATH=/home/ros/catkin_ws/src:/opt/ros/groovy/share:/opt/ros/groovy/stacks'
Hydro is thus not a factor and if I remove Wire.h from my arduino project the connection is successful and I can publish data.
Any help in order to help sove this problem will be appreciate and rewarded with... heu... love <3. Thanks a lot.
[EDIT for the comments]
@billtecteacher What I mean is, for the error to be appear I have to had #include <Wire.h>
at the begin of the code
@balto I rebuild the ros_lib for groovy using
cd <sketchbook>/libraries
rm -rf ros_lib
rosrun rosserial_arduino make_libraries.py .
what do you mean by adding wire and taking it out. Wondering if it the code associated with wire that is causing the problem and not wire.h?
Do you rebuild the ros_lib for groovy?
I edited the question to answer those questions.
I use the Arduino Wire library with rosserial so I do not believe that is the error. Can you check the code on the Arduino?
Well I ran in another problem and I suppressed hydro and reinstall groovy. I'll try reinstall rosserial_arduino and I'll tell if I still have that problem. But the code works fine without #include "Wire.h" and doesn't work with it. And it is the simplest publisher possible. I use nothing else.