The March of Progress – Sunny mk2 gets autonomous

So with the deadline of PiWars 2017 fast approaching, much progress had to be made on Sunny mk2. This weekend we lashed up a line following sensor and some IR range finders then hacked python into submission until our little raspberry pi controlled robot did what it was supposed to.

As always you can find the latest version of our code on github here:

The scripts running for these tasks are and They’re likely to change in the coming weeks as we tune Sunny for further autonomy. Let’s just hope he doesn’t go all skynet on us…again…

See the videos of it solving our cardboard maze and following a line below:


5 thoughts on “The March of Progress – Sunny mk2 gets autonomous

  1. Unbelievable! How quickly Sunny MK2 can get around the maze….and how much we’ve had to slow Schrödingbot down just to make it around (and we’re still touching the walls!)
    Well done!!!


  2. That’s really fantastic! – I see you’re using a qtr-8rc module (I think) which we are too… It’s the first time we’ve ever made a robot and we are miles away from actually being able to follow a line or turn corners in a maze. Hopefully we’ll meet at PiWars and maybe I can learn some magic from you 🙂


    1. Thanks Tom. It’s actually the qtr-8a we’ve got. That’s the analogue version so it produces an analogue value proportional to the reflectance characteristics of the object beneath it. This does mean that we’ve got to have an external ADC though. We would be happy to share our knowledge at PiWars! Look out for us on the Sunday 🙂


      1. Ah, the 8c version I have is capacitor discharge based and you have to time each IR sensor after turning on and off again… I think python is a bit slow so we’ve sometimes been getting no readings (ie. the results are 7us which, getting to the point of timing probably took too long. I’ve also had big issues with the PWM of ledon which allows you to reduce the current required from the pi as the module is a bit greedy given it’s got 8 pairs of IR phototransistors. All this knowledge is new so I’m happy either way if it works or not! (btw- your robot looks quite similar to ours – love your wheels though, that’s another thing we’ve struggled with).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s