Let's read the Internal Temperature Sensor on #BL602 and #BL604
https://github.com/lupyuen/bl_iot_sdk/tree/tsen/customer_app/pinedio_tsen
From #BL602 Reference Manual: The Internal Temperature Sensor is accessed thru ADC
https://github.com/bouffalolab/bl_docs/tree/main/BL602_RM/en
Reading the #BL602 Internal Temperature Sensor looks complicated ... But there's an easier way!
https://github.com/bouffalolab/bl_docs/tree/main/BL602_RM/en
#BL602 ADC HAL provides a helpful function for reading the Internal Temperature Sensor: "bl_tsen_adc_get"
https://github.com/lupyuen/bl_iot_sdk/blob/tsen/customer_app/pinedio_tsen/pinedio_tsen/demo.c#L1-L27
Reading #BL602 Internal Temperature Sensor with "bl_tsen_adc_get" has 2 issues ... 1️⃣ First reading is always too low ... 2️⃣ Result is returned as Integer even though the reading is actually Float
Let's copy "bl_tsen_adc_get" from #BL602 ADC HAL and fix the issues ... 1️⃣ Temperature is now returned as Float (not Integer) ... 2️⃣ Insert a delay during init to fix the first reading
Here's how we call "get_tsen_adc" to read #BL602 Internal Temperature Sensor as a Float (instead of Integer)
#BL602 Internal Temperature Sensor is now read as a Float ... And first reading is always correct! 🎉
Let's create a command to transmit #PineDio Stack BL604's Internal Temperature to #TheThingsNetwork
#Grafana receives #PineDio Stack BL604's Internal Temperature from #TheThingsNetwork ... And renders the Temperature Chart correctly 🎉
#Roblox also happily renders #PineDio Stack BL604's Internal Temperature ... Received via #TheThingsNetwork 🎉
Reading the Internal Temperature Sensor on #BL602 and BL604 ... All shall be explained in this article
Where's the Internal Temperature Sensor on #BL602
https://lupyuen.github.io/articles/tsen?2#wheres-the-internal-temperature-sensor
Reading #BL602 Internal Temperature Sensor the Quick Way ... May produce inaccurate results
https://lupyuen.github.io/articles/tsen?4#quick-but-inaccurate
Turning #BL602 into an #IoT Sensor Device ... For #LoRaWAN and The Things Network
https://lupyuen.github.io/articles/tsen?7#lorawan-and-the-things-network
Our #BL602 #IoT Gadget sends its Internal Temperature all the way to #TheThingsNetwork (via LoRaWAN)
https://lupyuen.github.io/articles/tsen?9#run-the-lorawan-firmware
Rendering #PineDio Stack BL604's Internal Temperature ... With #Grafana and #TheThingsNetwork
https://lupyuen.github.io/articles/tsen?10#grafana-and-roblox
Here's how we read the Internal Temperature Sensor on #BL602 and BL604 #RISCV SoCs ... And transmit to #TheThingsNetwork over LoRaWAN
#TheThingsNetwork works great with #Prometheus and #Grafana! 🎉 ... More about this in the next article
Transmitting #BL602's Internal Temperature to LoRaWAN and #TheThingsNetwork
https://lupyuen.github.io/articles/tsen?8#lorawan-command