DHT11 Added to ScratchGPIO

You can now use a DHT11 Temperature/Humidity sensor with ScratchGPIO.

To get readings simple use an example script like this to ask for readings once per second from a sensor connected to pin10.


You may also like...

10 Responses

  1. Rob Wilson says:

    Hi, I am new to this. I installed ScratchGPIO8 and tested it with blink11. It’s working fine.
    Next I connected up a DHT11 sensor (from Elegoo) and used your example script. I assume I have to set up two variables named humidity [temperature] sensor value, to show the outputs.
    Well I did that and connected up the module and ran the script. But I can’t get any values to show on those variables, other than 0!
    Could you see if I need to do anything else please?

    • cymplecy says:

      ScratchGPIO returns values using Scratch sensors.

      Select the Sensing category and then click on the little black arrow on the 2nd from bottom block

      You should now be able to see the temperature and humidity sensor values.

      If you tick the grey box – you can see the values on the stage or just drag them out to use as the equivalent of read-only variables


  2. Benjamin says:

    Hi, I don’t find temperature and humidity in the list of sensors values, is there a specific add-on or version of ScratchGPIO to install ?

    Thank you for any help you can provide,

    • cymplecy says:

      Should be available in the current version
      The sensors will not appear until you’ve done a broadcast to enable it to start sending readings

      I’ll try and find a DHT11 and make sure its works

      • cymplecy says:

        Sorry for delay – found a DHT11 and it didn’t work 🙁

        Found a bug I’d introduced and hopefully fixed it

        please re-install ScratchGPIO

  3. Pradel says:

    Hi !
    Im interested in the answer as well !… because I have exactly the same problem than Benjamin :
    I don’t find temperature and humidity in the list of sensors values !
    Does someone has an explanation?

  4. razmi says:

    Hi.. im a newbie. Does someone succeded to use the dht11 on pibrella ?

  5. Guillaume says:

    Hi Simon,
    Is it working with Scratch2GPIO8 ? I don’t find temperature and humidity in sensor ?


Leave a Reply to cymplecy Cancel reply

Your email address will not be published. Required fields are marked *