FiPy Temperature Sensor
-
It have, temperature sensor?
-
Yes, it has the MCU temperature, use
machine.temperature(), but it is not yet documented... (even the Pycom development documentation) :import machine machine. # type <Tab> keyboard to see the all objects of the machine context __class__ __name__ main ADC BROWN_OUT_RESET CAN DAC DEEPSLEEP_RESET HARD_RESET I2C PIN_WAKE PWM PWRON_RESET PWRON_WAKE Pin RMT RTC RTC_WAKE SD SOFT_RESET SPI Timer Touch UART ULP_WAKE WAKEUP_ALL_LOW WAKEUP_ANY_HIGH WDT WDT_RESET deepsleep disable_irq enable_irq flash_encrypt freq idle info mem16 mem32 mem8 pin_sleep_wakeup remaining_sleep_time reset reset_cause rng secure_boot sleep temperature unique_id wake_reason machine.temperature() # in F 116 (_ - 32)/1.8 # in C 46.66667 -
@rcolistete Thank you for booth answers :)
-
@rcolistete that’s probably the CPU’s temperature, which is most certainly quite different from ambient temperature, isn’t it?
-
@jcaron Yes, it is the ESP32 internal temperature sensor, always reading above the environment temperature (15-25 C more).
-
@lloureiro so the answer depends on what temperature you want to measure: the CPU temperature or the ambient temperature.
For the former you can use
machine.temperatureas suggested by @rcolisteteFor the latter you’ll need an external sensor. The Pysense board has one (though at least on the first version it wasn’t perfect due to not being isolated enough from sources of heat such as the CPU, IIRC). Or you could connect any external temperature sensor using SPI or I2C or any number of other interfaces. I would not recommend a sensor with an analog output as the ESP32 ADCs are not very precise.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login