Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use shineblink core to realize Oled display of temperature and hygrometer

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to use shineblink core to achieve temperature and hygrometer Oled screen display, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

I. Preface

The library function of shineblink core development board (Core) supports SHT30 temperature and humidity sensor, so it only needs to call two API to realize the function of temperature and humidity measurement.

PS:Core can achieve Wifi/Ble/NB/Lora/ThreadMesh/RFID/Eth/Usb/RS485/RS232 communication with only five or six lines of code, as well as more than 30 sensors / more than 10 hardware peripherals / more than 10 Mcu internal devices, and these functions can be run under up to 5 random unit contracts.

II. Production materials

A shineblink core development board

One module of sht30 temperature and humidity sensor

One 0.96 inch oled display screen.

A TYPE00-00003F circuit board. The schematic and PCB source files of the circuit board can be downloaded from the following network disk address (AD project):

Https://yunpan.360.cn/surl_yP9fgP7LVGa

3. Complete code LIB_Sht3xConfig ("IIC0", "10", "HIGH") LIB_0_96_OledConfig ("IIC1")-start big cycle while (GC (1) = = true) do-delay 1000 milliseconds LIB_DelayMs (1000)-query whether the sht3x sensor has a count of sht3x_flag,sht3x_temp Sht3x_humi = LIB_Sht3xGetResult ()-- if the sensor has data to generate if sht3x_flag = = 1 then-- displays temperature and humidity LIB_0_96_OledPuts ("2", "1", string.format ("temprature:% .2f", sht3x_temp)) LIB_0_96_OledPuts ("3", "1", string.format ("humidity:% .2f") on the second and third lines of the oled screen, respectively. Sht3x_humi) endend IV. Production process & result presentation

Core development way is very simple and elegant, with notepad (or any other editor) to open the Core development board TF card on the main.lua file, and then copy the above code to the main.lua file can be, because Core built-in Lua compiler, so you do not need to do any processing, Core can start working in accordance with the above code.

The following figure shows the effect of the code running after the assembly and welding is completed:

The above code updates and displays the output of the temperature and humidity sensor every 1 second.

After reading the above, have you mastered how to use shineblink core to realize the Oled display of the thermohygrometer? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report