Reader small image

You're reading from  Practical Arduino Robotics

Product typeBook
Published inMar 2023
PublisherPackt
ISBN-139781804613177
Edition1st Edition
Tools
Concepts
Right arrow
Author (1)
Lukas Kaul
Lukas Kaul
author image
Lukas Kaul

Lukas Kaul is a robotics Research Scientist, currently working at the Toyota Research Institute in Silicon Valley, where he develops mobile manipulation technologies to support people in their homes and in their workplace. Throughout his career he has worked on projects as diverse as humanoid robots, aerial robots and mobile manipulation systems. A maker at heart, Lukas has been using Arduino technology extensively for more than a decade in countless side-projects, ranging from mapping systems to self-balancing robots. Lukas is passionate about teaching robotics with Arduino to inspire and empower anyone who wants to enter the exciting field of robotics. He holds a PhD degree from the Karlsruhe Institute of Technology, Germany.
Read more about Lukas Kaul

Right arrow

Tuning and testing

There are a few parameters that we need to tune in order for the robot to function as expected. We can start with the directions in which the wheels turn. Our code assumes that if we pass a positive value to a motor’s SetPwm() function, the associated wheel spins forward. You can test this out by pressing the up arrow in the control pad on your phone and checking whether the wheels turn forward. If they spin the wrong way, you can either swap the order of the way the motor cables are plugged into the motor controller, or you can swap the values of the motor_dir_pin_A and motor_dir_pin_B variables for that motor.

The value of the button_increment variable determines how much the pmw value is increased for every button pressed on the control pad. The best value depends on the battery and the motors that you use. One press should be just enough to get the motors spinning reliably. You can do some testing and adjust the value accordingly.

The value of line_follow_pwm_offset...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Practical Arduino Robotics
Published in: Mar 2023Publisher: PacktISBN-13: 9781804613177

Author (1)

author image
Lukas Kaul

Lukas Kaul is a robotics Research Scientist, currently working at the Toyota Research Institute in Silicon Valley, where he develops mobile manipulation technologies to support people in their homes and in their workplace. Throughout his career he has worked on projects as diverse as humanoid robots, aerial robots and mobile manipulation systems. A maker at heart, Lukas has been using Arduino technology extensively for more than a decade in countless side-projects, ranging from mapping systems to self-balancing robots. Lukas is passionate about teaching robotics with Arduino to inspire and empower anyone who wants to enter the exciting field of robotics. He holds a PhD degree from the Karlsruhe Institute of Technology, Germany.
Read more about Lukas Kaul