mBlock/mBot/ME Temperature and Humidity Sensor



I have been having some trouble trying to use/code the ME Temperature and Humidity Sensor in mBlock.

When I try to read data output in mBlock from sensor it only gives me a reading of -0.065 all the time and I cant seem to get it to change.

Just wondering if anyone has had this or knows how to use this sensor in mBlock?


I even put a heater in front of the sensor for about 20mins and still reads same. No change at all!


I’m assuming that you have the correct port number. Did you try Slot 2 on the port? Just a thought…


Hi keu274,

In addition to Charles’s suggestions, you may also need upgrade firmware for the mBot first before you test this program.


Hi Keu274,

For the ME Temperature and Humidity Sensor, you need use following program block:


I just purchased a couple of Me Temperature and Humidity sensors V1.0. to be used in a class with the mCore mBot.The value reported back is always 0 using the example block code given above. I have upgraded the firmware and reset the default program. This is true for all 4 ports. Is the temp/humidity module supported on mCore? I have not had any difficulty with other electronic modules.


Hi MrBill,
mCore support the temp/humidity module. I just upgrade firmware for a mCore and test the temp/humidity sensor by running the same program, everything is working properly.

You may upgrade firmware for mBot again (no need to reset default program) refer to this document1. How to Upgrade Firmware for mBot.docx.zip (690.6 KB)
, then run the above program and see if it works.
Once still the same thing, please check following points:

  1. Make sure you set the same port on the program with the one connected to the sensor.
  2. Change the RJ25 cable for the sensor have a check.
  3. Make sure both side of the RJ25 cable have been plugged well.



Thank you to everyone that responded. I was using mBlock Version 3.4.5. After upgrading to 3.4.11 everything works as it should. In the past I was prompted to install the latest version of mBlock but not for the most recent. I see that with 3.4.11 there is now a “Check for update” in the Help drop down menu. That’s very helpful.



Hi Mr. Bill here again,

My problem was solved by using the newest version of mBlock (3.4.11) for only one of my Me Temperature and Humidity sensors. The second module would work only intermittently. After many different attempts I found that if I queried the device rapidly, say 10 times in 10 seconds, it would respond. Since the DHT11 (blue plastic box) is 90% of what is on the Me Temperature and Humidity module it was most likely the problem. I found Amazon selling 4 of the DHT11 chips for under $5, including shipping! There are only 4 pins to unsolder so the change out is fairly easy.
This solved my intermittent problem and it now works every time.
One other thing I learned is that when you rapidly query this module the temperature increases slowly. This is most likely caused by “self heating”. A voltage has to be applied to the thermistor to read out a temperature related resistance. Ideally you don’t want that voltage to be applied any longer than necessary so that the thermistor is not dissipating power in the form of heat. The solution is to allow the module to “rest” and not query it any more often than needed.

Thanks for providing this forum.



Hi MrBill,

You’re really good at it, thanks for sharing the experience.