With the bot built and the code written it was time to test the bot on home built replicas of some of the challenges.

The main purpose of the test was to ensure that the button mappings and the hardware worked. The pan / tilt was tested as was the spin up / down commands and the aiming laser. To ensure that we would be able to hit the targets at range the aiming laser was adjusted to ensure that at a distance of approximately 2 meters. Testing shoots were fired to ensure that the darts would travel the required distance. Which they did and some!

After a trip to a local DIY shop to purchase some wood it was cut into the correct lengths as per the dimensions that were provided on the Pi Wars website and the course was constructed. After several weeks of testing and tweaking of the code we were able to get the bot to navigate the course on a regular basis. To check that the code was actually reacting to what the sensors were reporting, instead of being hard coded to the course, we also ran the bot round the course in the opposite direction. After further tweaking it was able to do that as well so we were happy with the code that we had got for this challenge.

A course was constructed out of cardboard boxes to simulate the arena area and the height of the walls around it. We trimmed some empty toilet rolls to rest the example colour balls on to ensure that they were 10cm from the floor for testing.
After getting the bot to recognise one ball we set up the 4 balls in the arena and worked to get the bot travelling to each one in turn. Once we were happy with this we changed the position of the colour balls after ever run until we were happy it could cope with any combination that the balls might be set up on on the day.