Chapter 11

Mr. Wiley


  • Autonomous intelligent robots
  • Computer vision through OpenCV
  • Pre-assembled robotics platforms
  • Using multiple serial ports
  • Color filtering
  • Contour detection
  • Self-made wooden shields


The code downloads for this chapter are found at on the Download Code tab. The code is in the Chapter 11 download and individually named according to the names throughout the chapter.

You are going to create a robot called Mr. Wiley, which is capable of following objects using computer vision. Mr. Wiley is made of merging together the Arduino Robot platform with an Android device. The camera on your Android will be capturing images that the phone will analyze to decide how to react. The Arduino Robot platform is an inexpensive and easy-to-hack robotics platform that can be reprogrammed in full using the Arduino IDE.

Computer vision is born from the meeting between computers and cameras. In this project you use your phone or tablet to detect an object — a red ball in this case — and make a robot turn towards it. The Basic Robot you made out of two servo motors in Chapter 8 would suffice to implement this project, but it would be too slow. Therefore, we suggest using the Arduino Robot platform, which uses DC motors and moves much faster.

In this chapter you create a program that captures images and filters them to detect an object. It then decides whether or not the ...

Get Professional Android Open Accessory Programming with Arduino now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.