I am very impressed with the BrickPi (after having solved networking issues) and the scratch motor / sensor examples work great.

  1. on the motor example why does the code say
    "Broadcast Join MA D" and “Broadcast Join MA E” - what are the variables “D"and"E”?

  2. are you aware of examples combining motors with sensors eg ultrasonic?

Thanks ccpi


First, thanks! Running the forums and trying to troubleshoot problems sometimes gives us a slanted view of the product. It’s nice to get some positive feedback like this!

To try to answer your questions:

We put a guide to Scratch out in the November issues of MagPi. It might help a bit with programming and explaining how the examples are written. Turn to page 12.

1). Variables “D” and “E” are the keys you’re connecting to motor A. In this example, you’re hitting “D” to run the motor forward, and “E” to stop it.

2). I think the Ultrasonic Sensor does combine the motor and ultrasonic sensor, doesn’t it?

Just to let you know that as complete beginners my son and myself have successfully set up scratch to control the motors. Although it was not all plain sailing, We found the Magpi link the most useful and as the motor ports were not working at first we tried the sensor port, then used a different motor port to A.
We are now able to control the motor using port A. Although it crashes on set up with “connection failed” message. When it is set up again the message appears as …“service…” then it runs ok for a while. Any thoughts on how to remedy this?

Hey Pingpongpro1,
Just going through unanaswerd forum requests: we’ve updated Scratch mid-summer. There was a problem with it crashing and we had to go back and rewrite the Python script that runs in the background. It is now updated; if you do a pull request, or better, download and update your image, the background program runs consistently and doesn’t crash.

It also starts from a shortcut on the Desktop, making it a lot easier to startup.