24 thoughts on “Useful Links

  1. Hello there
    My sons school are studying temperature measurement at the moment and I would like to show them how to measure temperature on the Pi. Can I use a DS18B20 with Scratch GPIO or if not can that functionality be added?

      • I got sidetracked into debugging a beligerant bug when someone tries to autostart a Scratch script 😦
        So I’ve only got as far as wiring one up and reading its value from Python – I’ll try again tomorrow night to see what I can do
        Are you just envisaging one sensor per RPi? (answer is yes BTW 🙂 )


    • I too have found the DS18B20 a great simple device that is easily added to the GPIO in WebIOPi and in several Python setups. I too am interested in adding this functionality. It just needs three wires (+ve -ve and data GPIO pin) with a single 4k7 ‘pull up’ resistor between the +ve and data. A smart programmer / development would activate the Pi internal pull up which would simplify things even further.
      ~ Andrew

      • Thanks I will give this a spin.
        Can you confirm this is from within Scratch and the version GPIO(?) needed to make it tick. Perhaps add it into the visual-command-guide ?
        This guide is great thanks. Teachers I work with like this sort of one sheet. Laminated up as a quick refference card this sort of thing can help out the beginner a lot.
        ~ Andrew

      • I’m a programmer not a documentor 🙂 So my docs always lag the program features. And I only write them up once other have given me feedback that they actually work for them and I haven’t had much on this one #Catch22 🙂

      • I haven’t tried it without the 4.7k as I assumed a lower value than the 50k internal pull up would be needed. Not seen anything that suggests that it would work without the 4K7

  2. Hi Simon
    Thats great, I look forward to trying it out.
    I like one answer questions! so yes is the answer to your question regarding 1 sensor per pi.

    I’ve just spent the evening reading about how the external sensors are implemented. I like the way ScratchGPIO does all the background tasks like “enabling remote sensors” etc automatically. I think that will make teaching the kids a school a lot easier. I see the protocol for 2.0 is very different, have you looked into that as yet?

  3. Hi Simon
    Talk about making hard work for yourself, I was using an old ds18b20 and not getting an success until I found that I was actually using a ds18s20. Anyway I dug out the correct chip and your script works just fine!

  4. Hi Simon
    Brilliant! This is great, it will save the school a lot of cash since the ds18b20 is very cost effective! Will you make it available in the released version of Scratch GPIO. Just looking to the future if you ever need help for example with testing new code then let me know.


    • Yes – I normally switch dev stuff to stable once its been tested but the BETT show is on this week and I’m just leaving it alone until next weekend so no-one exhibiting and using it gets caught out by any regression that might be caused.

      Sometimes my dev version can be a little bit slower – more CPU resources used as it can be logging debugging stuff but that all the diff is

      Thank you for making me do this – I’ve been meaning to do it for a while but just not got round to it. If you find any other cheap and cheeful devices that you think could do with adding in – please give a shout 🙂


  5. I think I will put the BETT show in my calender for next year, it looks really interesting. When you have more time (and if you are willing!) I would like to discuss more about what road I should direct our school down (for example is it worth pushing scratch on the Pi or should is the Arduino a better choice).
    Enjoy the sow


    • The Arduinio is much better value for money and easier to use as a real world controller for LEDs and fixed motor driven equipment like fairground ride models or lift models. But for WiFi devices like robot vehicles, then the RPi is the tool for the job and all the push and PR is going into RPi.

      I use both in my schools.
      I’ve even tried Shrimps out but for schools it’s not worth saving £5 over a £10 Arduino Clone.

      The fact that the RPI is a true desktop capable computer makes software integration very easy and it’s a bit more difficult to produce the seamless ScratchGPIO RPi experience to a PC/Mac interfaced with an Arduino but I’m determined to give it a good shot

  6. Greeting from Ontario, Canada – I downloaded your Scratch GPIO s/w on November 18, 2013 (works very well) and now see that you have an update version 4.1.09 on Jan-2-2014. Can I assume the functions in the November version are compatible with the Jan 2 version? If so I will likely download it. Liked you recent ScratchGPIO Documentation.

    Motor control – I did try out your approach using the ULN2003 chip and this work well. I went on to try the SN75441 chip that also allows easy motor direction reversal.
    For an upcoming student demo and hands-on (grades 5-8) we are planning on running an old Hornby electric train set via Scratch and the SN75441. Keep up the good work, Simon!

    • The default pin initial state has changed – 11/12/13/15/16/18 are set as outputs as before but all others are set as inputs wit h no-pull up resistors enabled . This was to prevent inadvertent scramming of control rods if it was being used to control a nuclear reactor 🙂

      There have been a lot of internal changes and many more add-on boards are supported.

      Some long standing bugs have been found so it should be more bullet-proof and not lock up un-expectably as much – but its still software so it will go wrong occasionally.

      Thanks for the kind words.

      If you find you need it do something and it doesn’t please give me a shout 🙂


  7. I teach CS classes in US for high school students and use Scratch a lot. I’m always looking for creative projects with Scratch, and in particular interfacing it with the real world. Anyhow, I’ll plan to try out ScratchGPIO with my students – thanks for putting this together.

    One quick question – I’ve been looking for a way to interface Scratch with Lego Mindstorms new kit EV3. Do you have any resources on how this could be done? I haven’t been able to find anything on the web.


  8. I will do some research for you and crash around in the comand prompt / py script level and the technicality of the required WPU current w.r.t. Pi hardware. I know it works on other micros I use and can be a lot less than the nominal 4k7. I don’t mind using the resistor it is just nice if the 3 legs of the DS18B20 fit direct to he Pi
    ~ Andrew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s