We are students of the IES Rodrigo Botet de Manises (Valencia-Spain) we are working on a project to program with the Scratch the Raspberry 2 and the BricPi. We have downloaded the image: “2017.10.5-Raspbian_For_Robots-by-Dexter-Industries.zip” from your website, we have created a very simple example program to move the engine A and it does not work. By default we have saved it in the folder.
Hello @Neysel4 and welcome to the BrickPi world.
You have not stated what problems it is that you are facing. Can you please let us know so we can better help you?
Hello. our problem is that we bought a brickPic three years ago and we want to program it with Scratch. We saw that a new brickPic has gone on sale and we don’t know if the software that is on your website and we have installed, works with the old brickPic. we have made a little program following your statements and it doesn´t works.
The BrickPi+ is still supported and functional but you need to use the BrickPi+ software and examples, not the ones for the BrickPi3.
This is the program that we want to try
prueba.sb (45.8 KB)
But it does not work. However, your examples do work
Hello again, fortunately we have made motors work with Scratch, however, we don´t now how to do work sensors and we have done exactly the same as your explanation video. Link:
We used the sensor block to read the value of the sensor and when we pulldown menu (the little down arrow) to select which value we were interested in and the value didn’t appear.
We’re sorry, but this project is quite important for us, so it would be grate if you could answer as soon as posible.
Congrats on getting the motors to work!
To get the appropriate sensor to appear in the pulldown menu, you first need to send the corresponding broadcast. This will trigger a chain of events, and the sensor name will get added to the pulldown menu.
Yeah, we did the same as the video, but it still doesn´t work. Do you have any idea about what we are doing wrong?
Link of the video: https://www.dexterindustries.com/BrickPi/brickpi3-getting-started-step-4-program-brickpi-robot/brickpi3-getting-started-program-scratch/
Problems Programing Scratch
It seems you’re not doing anything wrong. And Scratch now has an issue. I need to investigate more.
Thanks for reporting it! It is indeed a new bug.
I’ll get back to you as soon as I have news.
Ok, after investigation, I think I know where the problem is.
You’re using the BrickPi+ and not the BrickPi3, yet are following the instructions for the BrickPi3.
The BrickPi+ works slightly differently in Scratch.
a) you have to set up the BrickPi+ at the beginning of your scratch program, telling it which sensor you have on which port.
b) you call the setup broadcast which sends all the info to the BrickPi+
c) you call the update broadcast each time you want to read a sensor (it will update all sensors each time)
d) the sensor name will appear in the sensor dropdown after the first call to the update broadcast.
See this image that sets up a touch sensor on port S1:
Problems Programing Scratch
Hi Cleo, yes I’m the teacher of these students.
Thanks for the response information. I will try this solution and I will tell you, wich is the result.
Hi Cleo, finally it works fine. Thanks a lot.
I tell you some considerations:
I need to add the block: broadcast(START) after the block broadcast(UPDATE).
For the motors, the interval of speed is (-100,100), With the value 100, It seems very slow.
One question, We have light sensor, that can detect black or white, we don’t have color sensor. Where is the type I must to put in the broadcast block. broadcast(S2 LIGHT) for example.