In this article, we are going to see how to work keypad controlled Bot movements. In the past, we learned how to control bots using the Serial monitor of the Arduino. This article is an advancement with the keypad control, instead of using a Serial monitor.
For ease of understanding, please refer to my previous article.
Requirements
- Arduino UNO
- Arduino Software
- L293D motor drivers
- Motor Drivers
- Robo chasis
- Keypad
- Battery 9v for external supply to motors
Keypad is used to access and control the movement of the gear motors. We press 2 forward, 8 backward, 4 left, 6 right and 5 to stop the bot movement. Array statements are used to initialize the Keypad elements and to describe connected pins of Arduino. 8 pins of Arduino are utilized to connect to the Arduino because we are using a 4x4 matrix.
- Open Arduino Software.
- Initialize the motor pins and keypad pins as per the requirement. We have utilized the 10-13 pins of Arduino for the motors of the bot.
- We have used 0 to 7 pins of Arduino for the keypad. Array statements are utilized for the functioning of the Keypad.
- Keypad library is included in order to utilize the keypad functions. Download it from www.Arduino.cc
- Add the library file to Arduino library collections.
- Compile and upload the coding in the Arduino and connect it to the battery supply.
In this article, we learned how to utilize the keypad to create a bot that can move along as per the user's command and wish. This Bot further can be modified to create many new applications like to make it a personal load carrier for household purposes. This can be implemented by utilizing the specified types of machinery.