Zumo Lines

The Zumo Robot Shield can be fitted with a Reflectance Sensor Array that allows it to solve different line/maze style problems. The Zumo Shield libraries provide methods to help read values from the sensor array. Packages and installation instructions can be downloaded from GitHub and once installed the sensor library can be included from Sketch > Include Library.  The sensor array uses the QTR sensors and therefore their library must also be included (installed as standard).

Simple Border Detection

Start by creating an instance of the ZumoReflectanceSensorArray class with:

You will also need to define a QTR_THRESHOLD that suits the lighting conditions and border/surface contrast and an array for the sensor values.

The number of sensors is 6 regardless of whether you have removed the 2nd and 5th sensors as described below. This is because we do not use the init method here to initialise the sensor array. For a border detection you can read the sensor values in the loop with:

and then respond to them accordingly:

Example

edgeDetection.jpg - 11/2015

Line Following

To be completed. There are many ways that the sensors can be mapped for different purposes.  For line maze solving and sumo type situations you might choose to make the following modification leaving you with just the middle and outer four sensors.   This sensor arrangement would be configured with:

zumoLineSensorShield.jpg - 11/2015

You will also need to declare an array that can be used to store sensor values ensuring that NUM_SENSORS equals the number of sensors in operation (see below).

You should then use the following command alongside some movement of the robot (programmeed or manual) to calibrate the sensors. During the calibration phase the robot should be moved across the dark and light areas of the robot arena.

About CDB 361 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.