ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
i have the same problem to with arduino and ros commmunication.when i use hx711 library and ros library together i get this msg."Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino"
this is my code on arduino
HX711 scale; float calibration_factor = -5880; //-7050 worked for my 440lb max scale setup ros::NodeHandle nh;
std_msgs::Float64 test; ros::Publisher p2("my_topic", &test); void setup() { delay(2000); scale.begin(DOUT, CLK); scale.set_scale(); scale.tare(); //Reset the scale to 0 long zero_factor = scale.read_average(); //Get a baseline reading delay(2000); nh.initNode(); nh.advertise(p2); delay(2000); }
void loop() { delay(200); scale.set_scale(calibration_factor); //Adjust to this calibration factor float weight=(scale.get_units()); test.data = weight; p2.publish( &test ); nh.spinOnce(); }
ros command is this
rosrun rosserial_python serial_node.py /dev/ttyUSB1
is there any way to use hx711 withouth library.
2 | No.2 Revision |
i have the same problem to with arduino and ros commmunication.when i use hx711 library and ros library together i get this msg."Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino"
this is my code on arduino
#include <ros.h>
#include <std_msgs/Float64.h>
#include "HX711.h"
#define
DOUT ros command is this
rosrun rosserial_python serial_node.py /dev/ttyUSB1
is there any way to use hx711 withouth library.