Temperature sensor not working
I've received my Zero to Hero package today and was testing some of the project. When I try to read out temperature it shows always 0 (zero). Connecting it with cable results the same. Anyone else had the same issue?
Comments
-
I have the same issue. Can you advise whether it's the DHT11 library not connecting properly?
0 -
If using arduino IDE
in
get
termometre_arduino.ino (the script in the book don't work)
Use the following libraries :
- For LCD :
ACROBOTIC SSD 1306
- For sensor DHT (many libraries, this one work, you need the 2 ) :
Adafruit Unified sensor by Adafruit
DHT sensor for adafruit
Hope this may help
0 -
Hi Guys,
Unfortunately, Micropython DHT library sometimes not giving data when combined with other sensors or actuators. Can you please test it out with Arduino IDE or Microblocks? Because we made sure that all of the Boards' DHT sensors are functioning with Arduino IDE.
Thanks a lot
Samet
0 -
Hi Samet - no, unfortunately the temperature module still does not work. It is reporting 0 degrees when using microblocks.
Tried both the microblock code in the ebook for 2.4, and the microblock code provided at the in project 2.4 (there are two different codes used here). Neither is working.
The humidity sensor is also not working.
Using the code in microblocks of:
-------
When started
Forever
Say "PicoBricks temperature"
-------
This returns an unchanging zero value for temperature. Humidity does the same. Have confirmed the picobrick board works - the rgb, led, buzzer etc. all work.
Can you please advise next steps. I have purchased two picobrick boards, neither of them has working temperature/humidity sensors.
0 -
Hello,
We tested all boards especially the temperature and humidty sensor. There is a library problem in Micropython. Can you try it with Arduino as well? It should work on both cards.
Thanks
0 -
I am going through the projects too and noticed the same temp 0 and humidity doesn't work with microblock environment. I haven't tried micropython but really would want it to work with microblock.
1 -
Hello @rktam,
You can test it with our Thermometer activities. There's GitHub link here;
Also, after testing components, if you think DHT 11 is working completely wrong, please report us.
Have a nice day☺️.
1 -
Thanks ozerngg. When I install arduino IDE, and associated libraries and run your code, the thermometer is working. However, I was hoping that the microblocks programming environment could be worked on, so I can go through all the projects with my daughter.
1 -
Since it seems that the issue is with MicroBlocks and not the other environments, can we get a fix for MicroBlocks? I don't really plan to use the other development tools.
0 -
Yes there s a problem with the MicroBlocks library code for temperature and humidity. Sometimes the DHT sensor library works, sometimes it does not. More often, it is the temperature that returns the correct value, even though the data is in the same data stream from the sensor. Using the GitHub code in Arduino returns not just an answer, but the correct temperature and humidity. I do hope they fix the library, as I too want to use the code with beginners. I like the immediate interactivity with MicroBlocks. However, with extensive code revisions, I find it useful to disconnect the board (not physically, but using the 'disconnect' button at the top right of the menu) when making these changes, and then reconnecting when they are done. The editing is a lot faster, and less choppy when the board is disconnected.
0 -
I also have this issue with Temp and Humidity. It's unacceptable that it doesn't work with MicroBlocks, especially with the Out of the Box demo. Imagine being an 8-10 year old kid and running into this situation, it would demotivate them and likely impair adoption of the boards.
Please let us know when to expect a fix. Thanks!
1 -
Hello @MRedRaider
You can test it with our Thermometer activities. There's GitHub link here;
Also, after testing components, if you think DHT 11 is working completely wrong, please report us.
Thanks.
0 -
MRedRaider is not saying its not workign with arduino code. his point and the frustration people have is arduino code is not going to be common or exciting for an 8 year old. honestly, as an adult the complicated coding to test if it works is frustrating as its a project for me and my 8 year old. He is not at a point he is interested in programing "code". drag and drop commands with simple instructions and a walkthrough style is what we all expected.
I am in the same level of frustration as red because this is not what we expected when we purchased picobricks and rather than find a solution to the issue you are just blowing us off with a response that it works with computer code.
1 -
I have found that the "Thermometer activities" works with the MicroBlocks as long as the device is connected to the computer. Disconnecting the device and powering it up causes the device to freeze up before displaying the temperature. The only debugging I can figure out is that somehow the 'Join' code block isn't converting the data from the thermometer into a String for the display unless the device is connected to the computer and the MicroBlocks software/web page. I have tried creating a variable and assigning the 'Join' block to the variable before different sections of code, and it always hangs at the 'Join' block.
0 -
Hello everyone,
Some updates have come to Microblocks. DHT11 will work if you try it by updating it via the browser.
Thanks.
Naze
1 -
Hi Joshua,
You are right but it was working with the first set of sensors. After we got the second party of DHT11s, problem started to escalade with several boards. Then we updated the library, it started to work again. Then we got complains about DHT11 on MicroPython.
Now we are writing a new library. Hope will release in few weeks on Github.
Thank you
Suat
0 -
There is still a problem with the MicroBlocks library. When the PicoBrick is connected and "running" the program will not work. You get an "Error: IC2 transfer failed" message from the 'when started' block and an "Error: Needs an integer" message from the 'PicoBricks temperature (°C)' block. If you click the 'stop' button, you will get the temperature reading from the 'PicoBricks temperature (°C)' block. The same happens with the 'PicoBricks humidity' block. This is as of attempting the website at 3:43 PM EDT on 10/31/2022 with updating the firmware on the board also.
0 -
@chad and others, experiencing i2c and other errors with MicroBlocks:
Your experiences point to an out of synch condition between the code on the board and the IDE, which can be caused by various things. Regarding DHT module errors, we have made some changes to the firmware to eliminate the problem. It is important that you run a current version of the MicroBlocks / FW which has the fix in it.
Now, without bothering with the reasons of errors, let's see how we can start from a clean slate and get to a running state:
Connect your board and make sure you are running with the latest FW and IDE versions. Best way to do this is to pick the RUN option from the MB web site (http://microblocks.fun/) and then do a FW update. Make sure you select No to the question of Pico W (WiFi).
After the update, remember to click on the USB icon and wait till it is green.
As of Nov.2, after the update, you should see the following version displays from "about" selection in the Settings menu:
Now select File / New to clean the slates on both the board and the IDE.
You are either copying a URL from one of the projects or loading a saved program. Either way, drag and drop the project link or load your code to the IDE. The USB icon will turn grey-ish and show a gradual change to green while the system synchs your code to the board. When it is fully green , you are ready to run.
It is possible that intermittently when you select RUN at this point, you may get an error due to serial port buffers. But don't mind that and select RUN again. We are going to release a version that will fix this intermittent problem very soon.
Your project should run without errors at this point. If for some reason, you are still experiencing problems, please report your cases, as above, with IDE and FW version info, so we can look into it.
1 -
Hi,
We were able to reproduce error with one of the versions. It is solved and published on Github under Examples/Pre-Installed Code.
Both main.py and picobricks.py are updated. Can you please check the temperature sensor with new files?
https://github.com/Robotistan/PicoBricks/tree/main/Examples/Pre-Installed%20Code
We will update all of the examples that contains DHT11 after your confirmation.
Have a nice day!
Suat
0 -
Attempted another update of firmware as of 8:39 AM EDT on 11/2/2022. Followed Turgut's instructions for a File / New clean slate. Each attempt to run the program with MicroBlock still generates the error message "Error: Needs an integer". This is not an intermittent error. The code will not transfer to the board.
0 -
If I include any OLED Graphics blocks, I get a reading from the PicoBricks temperature block only if "stopped". With only a PicoBricks Temperature block, I get an integer result either way.
"Running"
"Stopped"
0 -
Users with DHT problem in MicroBlocks:
Provided you are running the latest versin of IDE and FW, please try the code with a 500ms delay inserted at end of the loop. That would be a wait 500ms block from the control category. It should go right after the last write block, still within the loop scope.
And let me know.
Thanks.
0 -
Hi everyone,
We have found a strange timing problem with the DHT library and fixed it. The new release will include the fix.
Until than, if you want to make the Temperature project (or any project with the DHT11) work reliably, please modify the project code to include a 2 sec delay at the top. Then change the read loop delay to minimal 1 sec.
The 1 sec read interval is a DHT datasheet guidance and was cause of the problem with our library implementation.
Here is the way the new code should look:
You can drag and drop this code image onto the MicroBlocks IDE and run it.
Thanks to @chad helping us debug this problem.
3
Howdy, Stranger!
Categories
- 118 All Categories
- 3 Community
- 3 Hello Maker!
- 103 PicoBricks - Make, Run, Split, Merge
- 1 PicoBricks IDE
- 1 Arduino IDE
- 32 Hardware Support
- 15 PicoBricks Backers Hub
- 49 MicroBlocks Support
- 3 Shipping Support
- 2 MicroPython
- REX - 8 in 1
- Mechanical Parts and Parkour
- REX Main
- Arduino-IDE
- REX - Shipping
- 12 Products & Technology
- 2 Raspberry Pi
- Arduino
- 10 Other