I'm programming a sumobot with the world's safest programming language
Tags: showdev, embedded, contests
Published: 2019-11-14 18:38:10

---
title: I'm programming a sumobot with the world's safest programming language
published: true
description: I'm building a sumobot for the 2019 Make with Ada contest.
tags: #showdev, #embedded, #contests
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6yi28ls415isd1bx52l2.jpg
canonical_url: https://smallbusinessprogramming.com/im-programming-a-sumobot-with-the-worlds-safest-programming-language/ 
---

The [Make with Ada](https://www.hackster.io/contests/adacore2) contest is offering $8,000+ in prizes for "cool embedded applications programmed in the Ada and SPARK programming languages."

I've always wanted to build a robot and [I've been looking for excuses to play around with Ada](https://smallbusinessprogramming.com/how-i-intend-to-become-a-better-software-developer/) so I thought this would be a great time to kill two birds with one stone.

### Project overview
I'm building a robot that can compete in the mini-sumo class. I bought a [Zumo 32U4 robot](https://www.pololu.com/category/170/zumo-32u4-robot) online because it's packed with sensors, has a great software library, and I didn't want to build a robot from scratch. It's meant to be programmed entirely as an arduino microcontroller but I'm going a different route. 

I'm collecting all the sensor data from the zumo and sending it to my [microbit](https://microbit.org/) microcontroller over I2C. I'm using the [Ada drivers library](https://github.com/AdaCore/Ada_Drivers_Library) to program the microbit in Ada (and I'll add some SPARK too if I have time). The microbit will receive the I2C sensor data, decide what to do, and directly command the robot motors from the GPIO lines on the microbit. All of the critical code will be written in Ada/SPARK on the microbit, which I hope will impress the judges.

My robot should be quite a capable sumobot when I'm done.

### Current status
I have a working proof of concept. I'm collecting sensor data from the front proximity sensors, transferring it to the microbit over I2C, validating and processing it, and commanding the motors to turn the robot towards the detected object. My next task is to get all the electronics securely mounted on the zumo. Then I'll continue adding capabilities to my sumobot.

### Any ideas for features with "buzz effect" I should add to the project?
One of the judging criteria is buzz effect:

>one of the main goals of the Competition is to give more exposure to Ada, SPARK and related technologies. Projects will be judged in part with regards to how we think the project can have an impact in that regard: Will the project give more exposure to Ada? Does it have a “wow effect” that will appeal to the technology community in general? Will it show the benefits of Ada and related technologies?

I imagine a sumobot like mine would have more "buzz effect" than a lithium ion battery charger written in Ada. But, beyond that, I'm not entirely sure what they are looking for. I'd welcome any suggestions for improving my project's "buzz effect."

### More about the make with Ada contest
If you have any interest in embedded software development or Ada you should definitely consider entering the [make with Ada contest](https://www.hackster.io/contests/adacore2). The number of serious entries in previous years has been quite low. So you have a good chance of winning one of the top ten finalist prizes of $600, if not the 1st place prize of $2000 if you put a decent amount of effort into your entry. 

The final day of the contest is January 31, 2020. So you have lots of time.

### Wrapping up
I welcome any feedback on my project. If you have a way to make it better I'd love to hear from you. And I hope I can inspire at least one other person to join the contest. So let me know if you plan to enter the contest in the comments.