This super-mini Type-C temperature and humidity detector
project is based on the 9th LCSC Open Source Design Competition by Sensirion Sensors. The main focus of this project is simplicity, low cost, and ease of use. The
temperature and humidity sensor is the key component, using the Sensirion SHT40-BD1F-R2. To maintain a compact size, the officially recommended temperature and humidity sensor module was not used. However, the temperature and humidity IC can be extracted from that module and used; this IC is quite good, with simple driving, accurate values (ΔRH = ±1.0% RH, ΔT = ±0.1°C, VDD = 1.08 V ~ 3.6 VAvg), which is quite impressive.
The main control chip is the Heze Air001, which used to be very popular. I remember buying it for 10 yuan for a minimum system board and 10 Air001 chips. Now, it seems they don't sell them individually to enthusiasts anymore; you have to buy a whole reel of 2000 chips, which is unusable.
But! Due to some unclear reason, you can use the PY32F002AF15P6TU from PuRan (physical part number C5292059 in the online store). You can directly use the program written for the Air001 chip and then install it. The hardware is completely identical, and the price is incredibly attractive. LCSC chips are only about 1 RMB each, and you can easily buy them for a few cents on Taobao.
The screen is a 0.96 TFT LCD with a resolution of 80*160, and the driver IC is an ST7735. This screen is more than sufficient. I personally don't like OLED screens; I find them less enjoyable. Besides, screens are very cheap now; I bought mine for 2.8 RMB with free shipping on Taobao.
The programming interface uses an SH1.0 6-pin connector. Those familiar with Liangshanpai (a Chinese programming platform) should be familiar with this interface, as the pin definitions are consistent. However, I'm unsure if Liangshanpai's DapLink can be directly used to program this IC; I simply DIY-ed a DapLink with the same interface.
This Type-C interface is the main power supply interface, and soldering it is relatively difficult (for beginners). The reason for using this interface is that my device only has this Type-C interface available when all other USB ports are in use, so I chose this interface.
The remaining components are an LDO power chip, providing 3.3V power to the main control IC and peripherals, some resistors and capacitors, and fuses. Overall, the hardware is quite simple.
For the software
, I used the HAL library, which is quite user-friendly. You can directly copy the code generated by cubeMX, modify the pins slightly, and it's very easy to learn.
One hardware IIC drives the SHT40 to acquire temperature and humidity data.
One hardware SPI drives the TFT screen to display the temperature and humidity data.
The screen display mainly uses images to show the temperature and humidity sensor icons and numbers. Due to the screen size and to ensure easy data viewing, the UI is very simple: a temperature icon, a humidity icon, and the corresponding data.
Regarding the code, it's worth mentioning that there's not enough space to display all the images, so the corresponding units aren't shown.

The ROM space is almost full!

Next are the overall image displays:
front view of the board

, back view of the board, and

actual effect demonstration.

Finally, the relevant code is attached; you can download it if needed. One more thing to note: if using this Type-C male connector, the board thickness needs to be adjusted accordingly. For example, my board thickness is 0.8mm; otherwise, it won't fit. Thank you to JLCPCB for organizing this event, which allowed me to make this interesting little gadget. Thanks!