25 Responses

I’m currently developing a robot kit (based on the raspberry pi) to be used in classrooms. I’ve found your GPIO examples very helpful but my employers would like me to develop some blocks which make GPIO easier for younger students.

I was wondering if you could point me in the right direction for adding custom blocks?

I’m having a look at them and I don’t think any of them really suit my needs. I was under the impression that you wrote code in Python and somehow linked that to scratch?
That would be awesome if it’s possible, Squeak is a nightmare!

Hi,
I could not find out, how the LCD is connected to GPIO-Pins on the PiAndBash. There is no scheme and many of the links on their site, linking to pinventor are broken. The LCD is the same standard type I would use (HD44780). I would connect it directly to GPIO with 4 data wires (D4-D7) and 2 control wires (RS,E) without any additional hardware like I2C controllers.
I used it in my MakerKit http://amzn.to/TQTZ9O Now I am planning a successor for this product and would like to use ScrathGPIO.

I am using a similar library for controlling the display, but I made it much shorter and easier to understand – with same functionality:https://github.com/christianimmler/python_LCD
How can your library be used in Scratch?
Maybe I could then find a way to include my simpler one.
Just send me your shipping address via e-mail and I will send you one of these “MakeKits” including display and other components.

found the command should be MotorHxx,yy not Motorxx,yy
this example has an error as it should read MotorH35,37 and MotorH36,38

also are the pin number correct as http://4tronix.co.uk/blog/?p=1172 is listing different pins for the PZM motor Shim?
Motor A is physical pins 35 and 36 (Broadcom GPIO 16 and 19)
Motor B is physical pins 37 and 38 (Broadcom GPIO 26 and 20)

so would be
MotorH35,36 and MotorH37,38

but must say many thanks for scratchgpio and the new v8 version! works very well so far! (and hopes this helps others having the same problems i was)

Just checked, used this link from this page, have version 7 and now version 8beta on the desktop useing v8beta but needed MotorH syntax? (just thought you should know) thanks for the reply in letting me know, if you need anything tested let me know as willing to help (have a range of pi’s to try it all on as well pizero, piA+, piB+, pi2 and pi3 – all 40 pin versions and all with the explorer phat)

I have been working with the Adafruit 16 Channel Servo Hat and LED’s. My goal is to add a bunch of LED’s to a robot without using a lot of GPIO pins. I can get the LED’s to change brightness but not to turn off completely. I have tried both positive and negative numbers with the “set AdaServo1” block. Any suggestions for making the LED’s turn off?

I’ll try and dig out my board and see what is happening but I think you’re using the wrong syntax iirc. Servo commands change pulse ratios there should be a plain power command in Scratch GPIO I’ll have a look later as not near computer at moment

I finally got around to trying your suggestion. When I use the “AdaPower0” variable and set it to any number from 0 to 100 nothing happens. When I use the “AdaServo0” variable the LED connected to channel 0 turns on as soon as I create the variable but will not do anything else. I can control the LED (get it to blink on and off) on any channel with python from the command line using the Adafruit Library, but not through scratch.

I have been playing some more and discovered that for my setup AdaPower0 does not control a channel. When I use AdaPower1 the LED connected to channel 0 will turn on and off. I think that I had the ground wired funny. Anyway, I can get all the channels to activate LED’s and vary the brightness.
Thanks for all the work you are doing on ScratchGpio. I am using it with a group of kids at our school to create robots using Lego for the chassis and motors and the Raspberry Pi to control the bot.

Hi Simon, your scratchgpio project is great and the external program call in version 8beta is a fantastic addition!
However, i have a couple of questions about this beta version:
1- i notice that the external program call is executed twice, although it’s run once,
2- i can’t get the ds18b20 (one wire temperature sensor) running. In the debug logfile i see three lines
>ckecking for DS18B
>Starting DS180
>ds18b not found
Does the ds18b20 still work in scratchgpio8beta?
3- Do you have any plans to implement the DHT11 (temperature and humidity) sensor?