Scratch programming instructions?

So I finally have wifi running, and have set up Scratch as per instructions.

Umm… where can I find instructions on how actually to program Scratch /w motors and sensors??? Syntax? Blocks? Reading values? …anything?

Hey orenf!

Sorry for the frustration here; we don’t have excellent documentation yet. However, we’re working on a better guide for scratch and the BrickPi at the moment, and it will be out soon, promise!

In the meantime, if you cloned Scratch from github, you should have examples for every supported LEGO Mindstorm sensor and the motors. Hopefully they can help with how to get the motors moving and the sensors . . . sensing I guess.

We will announce the new howto shorty, promise.

Hi there!
Any update on this?
Also what does the test ultrasonic sensor program do or supposed to function as nothing is happening?
Thanks
Andrew

Yes! We wrote a better tutorial article for the Magpi a month ago or so. You can find it here:

Turn to Page 12.

I have my Brick Pi all configured, but I am having trouble running motors and sensors. It confuses me because in the Motor Test example it proposes that in order to run the motor in a continuous cycle you must broadcast join MA and E. Including the command broadcast join MA and D to stop. When I personally wanted to start programming my robot with a proportional line follower or what not. The motors wouldn’t run when i used broadcast join MA and E. I would appreciate help either from a person affiliated with Dexter Industries or somebody on this forum page the carries the instruction for this matter. Not only would I like detailed instruction for running the motors, but also the sensors, thank you.

Hey lsimchuk,

I’m a person affiliated with Dexter Industries. I’m not sure if I understand your question here though: you’ve joined motors as per the MagPi examples, but the mostors are not running as you expect them.

You’re also trying to run a line follower?

Yes I did use the motors as the magpi instructions but they didn’t work. I copied the code off the article. I would appreciate further instruction on how to initiate my motors and sensors on scratch because my brick pi is unfortunately collecting dust.

I am having the same problem. I run Motor test.sb example without any problem. However, when I try to code my own Scratch program copying the code of the Motor test.sb, it does not work. I enter ‘MA’ and ‘E’ in the two fields of the ‘join’ command. Any help is much appreciated. I am also missing a manual in which the commands for controlling the sensors and motors are explained.

Hello @lbrualla, you can find Scratch Programming information for the BrickPi here.

One thing you should check on your program is that you’ve enabled broadcasting. You might want to watch this video before you begin, as it covers the basics of writing a Scratch program for the BrickPi3.

Thanks for your reply. I followed the instructions on the video but I am still unable to move the motors or use the sensors in my own programs. Probably broadcasting is not enabled, but I do not know how to enable it. In the video you suggested there is menu that appears at time stamp 3:13. In my case this menu has only the two upper sections, that is, from “slider” to “distance”. The entries from “Encoder A” to “S3 US cm” do not appear.

@lbrualla can you post a screenshot picture of your program?

Hello @lbrualla
It seems you have a BrickPi+ and not a BrickP3, it that right? In that case, you cannot use the BrickPi3 Scratch syntax with the BrickPi+

The Scratch syntax for BrickPi+ is not as fleshed out as the one for BrickPi3.
You can only use commands like MA100 (no spaces)

I am a total novice but I have the same problem as Ibrualla, namely motor works when I use Motor.test.sb but not when I use my own scratch code.
Again mine is an older board, in October 2016 I purchased the Brickpi B with pre- loaded Dexter software SD card (Rasbian for Robots –Version Jessie and the Scratch version is 1.4 of 2016/05/02).
I understand that I cannot use the Brickpi3 scratch syntax with my older version. I tried your engineer’s (Cleoqc) tip and used the broadcast command MA100 (no spaces) but without joy.
Is there an old scratch program example pertaining to the Simplebot for full functionality (& hopefully Rigrapher tank) that you could direct me to that I could copy please (that will work with my versions)?
Also should I use the “ DI software Update” icon or will this up to date software conflict with my older hardware?
Please help

Hi all. I had the same problem, the example motor script worked with my Brickpi B but when I wrote the exact same it didn’t. I found the answer is that the example script also has code on the Stage, seems you need to do a Setup and Start (or whatever the commands are for the sensors) then my own scripts worked!

1 Like