Build Autonomous Mobile Robot from Scratch using ROS by Rajesh Subramanian

Build Autonomous Mobile Robot from Scratch using ROS by Rajesh Subramanian

Author:Rajesh Subramanian
Language: eng
Format: epub
ISBN: 9781484296455
Publisher: Apress


Using the delay() method and the digitalWrite() function, the program turns the LED on and off and delays a certain amount of time inside the loop.

Each time a toggle happens, the count variable is increased.

The callback method, messageCb(), is called whenever a message on the toggle led topic is received. It invokes the blink_led() method to turn the LED on and off for a predetermined number of times after setting the count variable to 0.

Line 40 creates a ROS subscriber called sub that subscribes to the toggle_led topic and sets its callback function to messageCb().



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.