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...

2 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:

      Hi
      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

      Simon

Leave a Reply

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