Alex Parry

Alex Parry

Alex is a Learning Manager at the Raspberry Pi Foundation and Computer Science teacher. When not coding, he enjoys table tennis, gaming and going for walks in the woods.


  • Glad you got it working Tan!

  • I’m not 100% sure. Can you run the same program in two different code cells to simulate the program being run twice?

  • @TanYowKheng ah I see. You’ve worked around that issue very nicely in your code though by using exception handling!

  • Very good point. I think some (but not all) people in education consider Python to be easier to start with due to the minimal syntax, but errors such as a command being indented wrongly can be much harder to debug!

  • It can be a pain installing libraries with IDLE. Glad to hear it worked with Mu!

  • Oh that’s really annoying. Which Python editor are you using? programs written in Python 2 rarely execute in Python 3 due to the changes in the syntax e.g. a print statement has no brackets in Python 2.

  • Hi Tan :) if you write to the text file (before reading it) then it will create the text file for you, hence your previous code working without errors.

    I’m not sure what you mean in your question. Are you talking about Python 3 and Python 2 programs or about the text file?

  • Welcome, I’m Alex and I am a Learning Manager at the Raspberry Pi Foundation.

    I will be one of the facilitators for this course from the 4th October to the 25th October. I hope you enjoy the course!

  • That would be a nice feature. Unfortunately, you would have to build the circuit in stages currently to demonstrate what you suggested.

  • There is no logical reason! In Computer Science exams, usually they will actually be in order (A, B, C etc.) no matter if it is a primary input or the output of a gate.
    X and Y were chosen as they were distinctly apart from A and B. But you could use whatever labels make most sense to you!

  • Apologies, that was from an old survey and shouldn't have been there.

  • Apologies, that was from an old survey and shouldn't have been there. Hope the remote schooling is going OK!

  • Glad you enjoyed the course Phil

  • Glad it was useful John

  • Thank you for your feedback Jerome, we are always looking to improve our courses. I will update the content before the next run of the course to take into account your comments. Glad you and your GF's son enjoyed building your robot buggy!

  • Sadly I don't have any recommendations for the Pi shutting down safely if it runs out of battery. My only advice is to make sure the battery has ample charge and to keep it topped up regularly.

  • Have you tried holding the robot over and off the line without it moving to test whether it detects the line or not?

  • Raaby looks like they are smiling with the orange wire under the UDS! Very cool.

  • Awesome :-)

  • Looks great Frank!

  • Thanks Rab for your suggestions :-)

  • Thanks for sharing Danny!

  • Sorry to hear you had trouble with some parts of the course Frank. We will follow up your comments, if there's anything else do let us know.

  • Thanks for your kind comments Fraser, glad you enjoyed the course and all the best for your future robotic projects!

  • Interesting that you had one normal looking value amongst the others values that seem that the UDS has timed out. Could you try increasing the sleep value in the while True loop?

  • That sounds like a great idea for the peer review! I'd also be really interested to see what you solution is if you'd like to share it on one of the comments afterwards.

  • That is a very common issue. One workaround could be providing slightly different speeds to each motor to try and maintain equal torque.

  • Hi Jeff, the jumper wire will be placed in between the two resistors which means that if you increase the second resistor value, the voltage at the divider will increase.
    It makes a bit more sense if you think about it the other way - increasing the resistance of the first resistor will decrease the voltage at the divider.

  • Love the idea of a skateboard chassis! Can't wait to see a photo :-)

  • Yeah that's a cool idea! You could even have a colour for telling the robot to stop (maybe for a certain period of time to "see" if there's any traffic)

  • Awesome, well done Rab! Line following is one of those tasks that doesn't seem too bad on paper but is often a pain to get working in reality. The next algorithm allows you to be more precise with the detection times and turning speed.

  • Hi Maria, what resistors do you have available? You can use the Python program above by changing the value of R1 to one of the resistors you have and it will calculate the resistor value for R2.

  • That really is a great bargain! Good old Zero W and it's low power consumption ;-)

  • Glad to have you on the course Joaquin :-)

  • Hi Jeff, the power source for the Pi depends on the model. You should be able to search for each model and find the specifics (sometimes forums are better than suppliers in going into more detail!).

  • Thank you for sharing your interesting journey through week 1 Mark! Really valuable to hear your software and hardware issues and workarounds :-)

  • Hi Ronald, pleased to have you on the course and hope that it supports you with helping your students to build robots!

  • Very cool!

  • Most DC motors this size will be a minimum of 6V. The 12V rating on the motor controller is the maximum amount of voltage supplied, so if you wanted a lower voltage then you would have to use a power supply that is lower than 12V.

  • @gedvernon your robot looks awesome :-)

  • When the UDS is too close to an object, the ultrasonic pulse is reflected back before the receiver is ready to detect a signal. If no signal is detected after a certain amount of time the UDS times out, hence the huge reading.

    I'm not entirely sure why the values of too close and too far away are so different. There's a chance that the ultrasound eventually...

  • It could be that one of the wires is not connected properly to the motor controller board, or there is a problem with one of the IN terminals or the motor. For each motor, one wire controls the forward direction and one controls the backward direction. You can try replacing the wire to see if that fixes it.

  • You can use any motors that work with your motor controller board :-)

  • Getting one pair of wheels to turn with roughly the same amount of force is quite challenging, so with two pairs it's even trickier! Really liked the wooden chassis, hopefully you still learnt a lot from the prototyping.

  • Love the once a box, now a robot picture you shared. Super spacious!