Scratch LED Control?


What control do we have over the Led’s in Scratch? I can’t seem to be able to do anything with them. The led_test python script works fine, they both flash off and on. But I can’t do the same thing from within the Scratch examples. All the movements, forward, back, left, right, work fine from within Scratch, just not the Led functions. Maybe I’m doing something wrong? I’m using the provided Scratch example programs. Again, all works fine in Scratch, but Led control.


John, I made the mistake of taking the tape off the wheel Encoders when I got the gopigo. I have used masking tape, and cut out all the slots, and it seems to work ok, but may be the reason it doesn’t track “dead straight”. Is it possible to get “new” Encoders, I haven’t seen them listed anywhere?



So you are not able to control just the LED’s in scratch and did you try clicking the LED buttons a few times. This sounds a bit strange but let me look into the source too.

I think you should wait a bit for the encoder testing. Right now the PID is disabled from the software so the encoder vause are not used a lot. We’ll be sending out a software update that should help solve the problem. Do let us know after that if you encoders don’t work.



Here’s a screen shot with Scratch GoPiGo_Basic_Test, and the terminal open, running GoPiGo_Scratch_Start. Does this look correct?

Don’t have the knowledge yet to figure out what’s going on, and I still can’t get either Led to work from within Scratch, but they work fine from a Python script?

Any more ideas?


We had updated the python library and the firmware a while back with the new led code so I think that might be the reason the scratch library is not able to control the Led’s. I’ll have a look at the source and update you about the problem. Meanwhile, can you let us know if the GoPiGo scratch communicator throws any errors when you run the scratch programs.



Sorry for taking this much time to get back on this.

We found a bug with the Scratch library that we had. We had made some changes to the GoPiGo library which was the reason that the LED control stopped working.

We have updated out Github repository, so if you just update you code, that should make it work.

Do let us know if you need any more help.