ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
i figure it out.the code should be like this.
void pwm( const std_msgs::String& cmd_msg)
{
if (cmd_msg.data[0]=='q')
{
digitalWrite (13, HIGH);
digitalWrite (12, LOW);
}
else if (cmd_msg.data[0]=='a')
{
digitalWrite (12, HIGH);
digitalWrite (13,LOW);
}
thank you for all.for the effort.
2 | No.2 Revision |
i figure it out.the code should be like this.
void pwm( const std_msgs::String& cmd_msg)
{
if (cmd_msg.data[0]=='q')
{
digitalWrite (13, HIGH);
digitalWrite (12, LOW);
}
else if (cmd_msg.data[0]=='a')
{
digitalWrite (12, HIGH);
digitalWrite (13,LOW);
}
thank you for all.for the effort.effort. @lucasw @billy @maarten and @lagankapoor