Now you can make your own custom version of obstacle avoiding robot. Assemble the robot, wire up the modules, upload the code, and add your own flavor. Cruising with a swaying IR sensor and a mp3 player onboard, this DIY obstacle avoiding robot has a new added feature: vocal.
This is what it looks when finishing assembling and wiring the physical parts. Cute!
Step 3: Programming
For time's sake, I am not gonna walk through all the codes and explanations here. Tips of using the DFPlayer Mini mp3 module can be found here. I used the sound files of popular tower defense game Carrot Fantasywhen the robot encounters an obstacle. Alternatively, you can also change it and place other audio files as you wish, to make it even more funny. Anyway, the Arduino Code and Sound Effects Pack are shared below. Looks and plays great.