This post was last edited by ¤ß¤º¤¸ on 2024-2-16 16:16 ### 07 Ateli AT32A403 development board review 07 Sensor module test BH1750 light intensity sensor ## 1. Hardware and software platform 1. AT32A403A Board development board 2. MDK-ARM Keil 3. 0.96 inch IIC interface OLED display module 4. Sensor module DHT11 temperature and humidity sensor BH1750 light intensity sensor [attach] 786182 [/attach] [attach] 786178 [/attach] ### AT32 sensor module test [attach] 786183 [/attach] The original plan was to test three different types of sensors: AHT10, BH1750, and BMP280. After finding the sensor, we first used STM32 to verify the quality of the sensor. Because we had done the experiment before, we finally found that the BMP280 sensor might be broken, so we needed to delete the driver transplantation, and then we thought about adding some other sensors. ### 2. BH1750 light intensity sensor BH1750FVI is a digital ambient light sensor IC for I2C bus interface. This IC is most suitable for obtaining ambient light data for adjusting the backlight power of mobile phone LCD and Keypad. (Sensor principle reference network) - IIC bus interface - Spectral responsibility is similar to human eye response - Illuminance digital converter - Wide range and high resolution. (1 - 65535 lx) - Low current through power-off function - 50Hz / 60Hz optical noise suppression function - 1.8V logic input interface - No external parts required - Low light source dependence. (eg incandescent, fluorescent, halogen, white LED, sun lamp) - 2 I2C slave addresses can be selected. - Adjustable measurement of optical window influence (Using this function you can detect a minimum of 0.11 lx and a maximum of 100000 lx.) - Small measurement variation (+/- 20%) - Infrared influence is minimal. Pin definition: | Pin number | Name | Description | | :----- | :--- | :---------------------------------------------------------- | | 1 | VCC | Positive power supply voltage source | | 2 | SCL | IIC clock line, clock input pin, output clock by MCU | | 3 | SDA | IIC data line, bidirectional IO port, used to transmit data | | 4 | ADDR | IIC address line, when connected to GND, the device address is 0100011, when connected to VCC, the device address is 1011100 | | 5 | GND | Negative power supply voltage source |
### 3.BH1750 driver code drv_bh1750.c ```c #include "main.h" /* Application description: Before accessing the I2C device, please call i2c_CheckDevice() to detect whether the I2C device is normal. This function will configure the GPIO */ static void I2C_BH1750_GPIOConfig(void); //========================================================================================================= // Function function: IIC peripheral driver function part // Function tag: i2c_Delay // Function description: I2C bus bit delay, fastest 400KHz // Parameter: None // Return value: None //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //= ... Working conditions: CPU main frequency 72MHz, MDK compilation environment, level 1 optimization When the number of loops is 10, SCL frequency = 205KHz When the number of loops is 7, SCL frequency = 347KHz, SCL high level time 1.5us, SCL low level time 2.87us When the number of loops is 5, SCL frequency = 421KHz, SCL high level time 1.25us, SCL low level time 2.375us */ for (i = 0; i < 10; i++); } //================================================================================================================== // Function: IIC Peripheral driver function part // Function tag: i2c_Start // Function description: CPU initiates I2C bus start signal // Parameter: None // Return value:None//------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //================================================================================================================= void i2c_Start(void) { /* When SCL is high, a falling edge on SDA indicates the start signal of the I2C bus*/ BH1750_I2C_SDA_1(); BH1750_I2C_SCL_1(); i2c_Delay(); BH1750_I2C_SDA_0(); i2c_Delay(); BH1750_I2C_SCL_0(); i2c_Delay(); } //================================================================================================================== // Function function: IIC peripheral driver function part // Function tag: i2c_Stop // Function description: CPU initiates I2C bus stop signal // Parameter: None // Return value: None //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //================================================================================================================ void i2c_Stop(void) { /* When SCL is high, a rising edge on SDA indicates the I2C bus stop signal*/ BH1750_I2C_SDA_0(); BH1750_I2C_SCL_1(); i2c_Delay(); BH1750_I2C_SDA_1(); } //==================================================================================================== // Function function: IIC peripheral driver function part // Function tag: i2c_SendByte // Function description: CPU initiates I2C bus stop signal // Parameter: _ucByte: byte waiting to be sent // Return value: None //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //============================================================================================================= void i2c_SendByte(uint8_t _ucByte) { uint8_t i; /* send high bit 7 of the byte first */ for (i = 0; i < 8; i++) { if (_ucByte & 0x80) { BH1750_I2C_SDA_1(); } else { BH1750_I2C_SDA_0(); } i2c_Delay(); BH1750_I2C_SCL_1(); i2c_Delay(); BH1750_I2C_SCL_0(); if (i == 7) { BH1750_I2C_SDA_1(); // Release the bus } _ucByte <<= 1; /* shift left one bit */ i2c_Delay(); } } //====================================================================================================================== // Function function: IIC peripheral driver function part // Function tag: i2c_ReadByte // Function description: CPU reads 8-bit data from the I2C bus device // Parameter: None // Return value: Read data //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //= ... (BH1750_I2C_SDA_READ()) { value++; } BH1750_I2C_SCL_0(); i2c_Delay(); } return value; } //==================================================================================================================== // Function function: IIC peripheral driver function part // Function tag:i2c_WaitAck // Function Description: CPU generates a clock and reads the ACK response signal of the device // Parameter: None // Return value: Return 0 for correct response, 1 for no device response //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //= ... i2c_Delay(); BH1750_I2C_SCL_1(); /* CPU drives SCL = 1, then the device will return ACK response*/ i2c_Delay(); if (BH1750_I2C_SDA_READ()) /* CPU reads the status of the SDA port line*/ re = 1; else re = 0; BH1750_I2C_SCL_0(); i2c_Delay(); return re; } //===================================================================================================================== // Function function: IIC peripheral driver function part // Function tag: i2c_Ack // Function Description: CPU generates an ACK signal // Parameter: None // Return value: None //------------------------------------------------------------------------------------------------ // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //======================================================================================================================= void i2c_Ack(void) { BH1750_I2C_SDA_0(); /* CPU drives SDA = 0 */ i2c_Delay(); BH1750_I2C_SCL_1(); /* CPU generates 1 clock */ i2c_Delay(); BH1750_I2C_SCL_0(); i2c_Delay(); BH1750_I2C_SDA_1(); /* CPU releases SDA bus*/ } //===================================================================================================================== // Function function: IIC peripheral driver function part // Function tag: i2c_NAck // Function description: CPU generates 1 NACK signal // Parameter: None // Return value: None //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //======================================================================================================================= void i2c_NAck(void) { BH1750_I2C_SDA_1(); /* CPU drives SDA = 1 */ i2c_Delay(); BH1750_I2C_SCL_1(); /* CPU generates 1 clock */ i2c_Delay(); BH1750_I2C_SCL_0(); i2c_Delay(); } //================================================================================================== // Function function: IIC peripheral driver function part // Function tag: I2C_BH1750_GPIOConfig // Function description: Configure the GPIO of the I2C bus, using analog IO // Parameter: None // Return value: None //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //========================================================================================== static void I2C_BH1750_GPIOConfig(void) { gpio_init_type gpio_init_struct; /* enable the gpioa clock */ crm_periph_clock_enable(BH1750_RCC_I2 C_PORT_CLOCK, TRUE); /* set default parameter */ gpio_default_para_init(&gpio_init_struct); /* configure the gpio */ gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_mode = GPIO_MODE_OUTPUT; gpio_init_struct.gpio_pins = BH1750_I2C_SCL_PIN | BH1750_I2C_SDA_PIN; gpio_init_struct.gpio_pull = GPIO_PULL_UP; gpio_init(BH1750_GPIO_PORT_I2C, &gpio_init_struct); /* Give a stop signal, reset all devices on the I2C bus to standby mode*/ i2c_Stop(); } //================================================================================================ // Function function: IIC peripheral driver function part // Function tag: i2c_ReadByte // Function description: Detect I2C bus devices, CPU sends the device address, and then reads the device response to determine whether the device exists // Parameter: _Address: I2C bus address of the device // Return value: Return value 0 indicates correct, return 1 indicates not detected //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //======================================================================================================================= uint8_t i2c_CheckDevice(uint8_t _Address) { uint8_t ucAck; i2c_Start(); /* Send start signal*/ /* Send device address + read/write control bit (0 = w, 1 = r) bit7 first*/ i2c_SendByte(_Address | BH1750_I2C_WR); ucAck = i2c_WaitAck(); /* Detect device ACK response*/ i2c_Stop(); /* Send stop signal*/ return ucAck; } //========================================================================================================== // Function function: BH1750 peripheral driver function part // Function tag: BH1750_Byte_Write // Function description: BH1750 writes a byte // Return value Success: 0 Failure: non-0 //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //========================================================================================================================== uint8_t BH1750_Byte_Write(uint8_t data) { i2c_Start(); //Send write address i2c_SendByte(BH1750_Addr|0); if(i2c_WaitAck()==1) return 1; //Send control command i2c_SendByte(data); if(i2c_WaitAck()==1) return 2; i2c_Stop(); return 0; } //==================================================================================================== // Function function: BH1750 peripheral driver function part // Function tag: BH1750_Read_Measure // Function description: BH1750 reads measurement data // Return value Success: Returns light intensity Failure: Returns 0 //------------------------------------------------------------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //= ... i2c_Stop(); return receive_data; //Return the read data} //===================================================================================================================== // Function function: BH1750 peripheral driver function part // Function tag: BH1750_Power_ON // Function description:BH1750s power on//------------------------------------------------ -------------------------------------------------- -- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //==================== ================================================== ============================ void BH1750_Power_ON(void) { BH1750_Byte_Write(POWER_ON); } //================================================ ================================================== // Function: BH1750 peripheral driver function part // Function tag: BH1750_Power_OFF // Function description: //BH1750s power off //--------------------- -------------------------------------------------- -------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //================================================ ================================================== void BH1750_Power_OFF(void) { BH1750_Byte_Write(POWER_OFF); } //==================================== ================================================== ============= // Function: BH1750 Peripheral driver function part // Function tag: BH1750_RESET // Function description: BH1750 reset is only valid when powered on //------------------------ -------------------------------------------------- ----------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 / /================================================= ===================================================== void BH1750_RESET(void) { BH1750_Byte_Write(MODULE_RESET); } //================================================ ================================================== // Function function: BH1750 peripheral driver function part // Function tag: BH1750_Init // Function description: BH1750 initialization //------------------------ -------------------------------------------------- ----------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //================================================ ================================================== // void BH1750_Init(void) { I2C_BH1750_GPIOConfig(); /* Configure GPIO */ BH1750_Power_ON(); // Power on BH1750s //BH1750_RESET(); // Reset BH1750 BH1750_Byte_Write(Measure_Mode); //SysTick_Delay_ms(120); } //================================================ ================================================== // Function: BH1750 peripheral driver function part // Function tag: LIght_Intensity // Function description: Get light intensity //----------------------- -------------------------------------------------- ------------------------ // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //================================================ ================================================== float LIght_Intensity(void) { return (float)(BH1750_Read_Measure()/1.1f*Resolurtion); } ```` drv_bh1750.h ````c #ifndef __DRV_BH1750_H #define __DRV_BH1750_H #include "main.h" //-------------------------------------------------------------------------------------------------- // Macro custom declaration | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //-------------------------------------------------------------------------------------------------- //BH1750 address #define BH1750_Addr 0x46 //BH1750 instruction code #define POWER_OFF 0x00 #define POWER_ON 0x01 #define MODULE_RESET 0x07 #define CONTINUE_H_MODE 0x10 #define CONTINUE_H_MODE2 0x11 #define CONTINUE_L_MODE 0x13 #define ONE_TIME_H_MODE 0x20 #define ONE_TIME_H_MODE2 0x21 #define ONE_TIME_L_MODE 0x23 //Measurement mode #define Measure_Mode CONTINUE_H_MODE #define BH1750_I2C_WR 0 /* Write control bit */ #define BH1750_I2C_RD 1 /* Read control bit */ //-------------------------------------------------------------------------------------------------- // Hardware Port Definition | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //-------------------------------------------------------------------------------------------------- /* Define the GPIO port connected to the I2C bus. You only need to modify the following 4 lines of code to change the SCL and SDA pins at will*/ #define BH1750_GPIO_PORT_I2C GPIOC /* GPIO port*/ #define BH1750_RCC_I2C_PORT_CLOCK CRM_GPIOC_PERIPH_CLOCK /* GPIO port clock*/ #define BH1750_I2C_SCL_PIN GPIO_PINS_11 /* GPIO connected to the SCL clock line */ #define BH1750_I2C_SDA_PIN GPIO_PINS_12 /* GPIO connected to the SDA data line */ //-------------------------------------------------------------------------------------------------- // Reference function declaration | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //-------------------------------------------------------------------------------------------------- void i2c_Start(void); void i2c_Stop(void); void i2c_SendByte(uint8_t _ucByte); uint8_t i2c_ReadByte(void); uint8_t i2c_WaitAck(void); void i2c_Ack(void); void i2c_NAck(void); uint8_t i2c_CheckDevice(uint8_t _Address); void BH1750_Init(void); //IIC initialization float not included LIght_Intensity(void); //Read the value of light intensity uint8_t BH1750_Byte_Write(uint8_t data); uint16_t BH1750_Read_Measure(void); void BH1750_Power_ON(void); void BH1750_Power_OFF(void); void BH1750_RESET(void); //-------------------------------------------------------------------------------------------------- // | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //-------------------------------------------------------------------------------------------------- //Resolution Light intensity (unit lx) = (High Byte + Low Byte) / 1.2 * Measurement accuracy #if ((Measure_Mode==CONTINUE_H_MODE2)|(Measure_Mode==ONE_TIME_H_MODE2)) #define Resolurtion 0.5 #elif ((Measure_Mode==CONTINUE_H_MODE)|(Measure_Mode==ONE_TIME_H_MODE)) #define Resolution 1 #elif ((Measure_Mode==CONTINUE_L_MODE)|(Measure_Mode==ONE_TIME_L_MODE)) #define Resolution 4 #endif /* Define macros for reading and writing SCL and SDA, which increases the portability and readability of the code*/ #define BH1750_I2C_SCL_1() gpio_bits_write(BH1750_GPIO_PORT_I2C, BH1750_I2C_SCL_PIN,Bit_SET) /* SCL = 1 */ #define BH1750_I2C_SCL_0() gpio_bits_write(BH1750_GPIO_PORT_I2C, BH1750_I2C_SCL_PIN,Bit_RESET) /* SCL = 0 */ #define BH1750_I2C_SDA_1() gpio_bits_write(BH175 0_GPIO_PORT_I2C, BH1750_I2C_SDA_PIN,Bit_SET) /* SDA = 1 */ # define BH1750_I2C_SDA_0() gpio_bits_write(BH1750_GPIO_PORT_I2C, BH1750_I2C_SDA_PIN,Bit_RESET) /* SDA = 0 */ #define BH1750_I2C_SDA_READ() gpio_input_data_bit_read(BH1750_GPIO_PORT_I2C, BH1750_I2C_SDA_PIN) /* Read SDA port line status*/ #endif ``` #### The modified code uses analog IIC for communication. The advantage of this is that it does not require specific pins. Any pin can be simulated. In MCU chips, there are relatively more resources like timers and serial ports, but there are relatively few interfaces like SPI, IIC, etc. For example, an OLED module with an IIC interface, a BH1750C Sensor, assuming that the chip has only two IIC interfaces, it is obviously not enough if there is a sensor or module with a third IIC interface. Therefore, it is necessary to use GPIO to simulate IIC communication. The part of the driver code above that needs to be modified (when applied to different MCU chips, most of the modifications are to modify the gpio function name) ```c /* Define the GPIO port connected to the I2C bus, just need to modify the following 4 lines of code Change the pins of SCL and SDA at will*/ #define BH1750_GPIO_PORT_I2C GPIOC /* GPIO port*/ #define BH1750_RCC_I2C_PORT_CLOCK CRM_GPIOC_PERIPH_CLOCK /* GPIO port clock*/ #define BH1750_I2C_SCL_PIN GPIO_PINS_11 /* GPIO connected to SCL clock line*/ #define BH1750_I2C_SDA_PIN GPIO_PINS_12 /* GPIO connected to the SDA data line */ ``` ```c //================================================ ================================================== // Function: IIC peripheral driver function part // Function tag: I2C_BH1750_GPIOConfig // Function description: Configure the GPIO of the I2C bus, using analog IO // Parameter: None // Return value: None //-- -------------------------------------------------- --------------------------------------------- // | - | - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 //================================================ ================================================== static void I2C_BH1750_GPIOConfig(void) { gpio_init_type gpio_init_struct; /* enable the gpioa clock */ crm_periph_clock_enable(BH1750_RCC_I2C_PORT_CLOCK, TRUE); /* set default parameter */ gpio_default_para_init(&gpio_init_struct); /* configure the gpio * /gpio_init_struct.gpio_drive_strength= GPIO_DRIVE_STRENGTH_STRONGER; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_mode = GPIO_MODE_OUTPUT; gpio_init_struct.gpio_pins = BH1750_I2C_SCL_PIN | BH1750_I2C_SDA_PIN; gpio_init_struct.gpio_pull = GPIO_PULL_UP; gpio_init(BH1750_GPIO_PORT_I2C, &gpio_init_struct); /* Give a stop signal, reset all devices on the I2C bus to Standby mode*/ i2c_Stop(); } ``` ### 4. Test effect 1. Main function ```c #include "main.h" //__IO uint32_t time_cnt = 0; void OLED_Show_Example(void) { OLED_ShowString_08x16(00,0,"AT32 AHT10 OLED"); OLED_ShowString_08x16(0,2,"Time:2024.02.16"); OLED_ShowString_06x08(0,4,"Temp:"); OLED_ShowString_06x08( 70,4,"Humi:"); OLED_ShowString_06x08(48,4,"^C"); OLED_ShowString_06x08(116,4,"%"); OLED_ShowString_06x08(0,5,"Light:"); OLED_ShowString_06x08(100,5 ,"lux"); OLED_ShowCHinese(0,6,13); OLED_ShowCHinese(16,6,14); OLED_ShowCHinese(32,6,15); OLED_ShowCHinese(48,6,16); OLED_ShowCHinese(64,6,17); } void Hardware_Iint(void) { system_clock_config(); at32_board_init(); uart_print_init(115200); printf("Hardware_Init start [ok]\r\n"); module_smg_gpio_iint(); printf("module_smg_gpio_iint [ok]\r\n"); OLED_Init(); printf("OLED_Init [ok]\r\n") ; DHT11_Init(); printf("DHT11_Init [ok]\r\n"); BH1750_Init(); printf("BH1750_Init [ok]\r\n"); printf("Hardware_Init end [ok] \r\n"); } /** *
@brief main function. * @param none * @retval none */ int main(void) { int8_t Temperature; int8_t Humidity; float Light,aht_temp,aht_humi; int8_t aht_err; DHT11_Data_TypeDef DHT11_Data; Hardware_Iint(); printf("at_start_a403a board testing 2024-02-16\r\n"); printf ("at_start_a403a board module aht10-oled \r\n"); OLED_Show_Example(); while(1) { if( DHT11_Read_TempAndHumidity ( & DHT11_Data ) == SUCCESS) { Temperature = DHT11_Data.temp_int; Humidity = DHT11_Data.humi_int; } else { printf("Read DHT11 ERROR!\r\n"); } printf("temperature=%d,humidity= %d \r\n" ,Temperature,Humidity); delay_ms(500); if (!i2c_CheckDevice(BH1750_Addr)) { Light = LIght_Intensity(); } printf("Light_Value:%.1fLx\r\n",Light); delay_ms(500); OLED_ShowNumber_UnsignedInteger_06x08 (32,4,Temperature,2); OLED_ShowNumber_UnsignedInteger_06x08(100,4,Humidity,2); OLED_ShowNumber_Float_06x08(40,5,Light,5,1); } } ``` 2. Test results
aht_humi; int8_t aht_err; DHT11_Data_TypeDef DHT11_Data; Hardware_Iint(); printf("at_start_a403a board testing 2024-02-16\r\n"); printf("at_start_a403a board module aht10-oled \r\n"); OLED_Show_Example(); while(1) { if( DHT11_Read_TempAndHumidity ( & DHT11_Data ) == SUCCESS) { Temperature = DHT11_Data.temp_int; Humidity = DHT11_Data.humi_int; } else { printf("Read DHT11 ERROR!\r\n"); } printf(" temperature=%d,humidity= %d \r\n" ,Temperature,Humidity); delay_ms(500); if (!i2c_CheckDevice(BH1750_Addr)) { Light = LIght_Intensity(); } printf("Light_Value:%.1fLx\r\n",Light); delay_ms(500); OLED_ShowNumber_UnsignedInteger_06x08(32,4,Temperature,2); OLED_ShowNumber_UnsignedInteger_06x 08( 100,4,Humidity,2); OLED_ShowNumber_Float_06x08(40,5,Light,5,1); } } ``` 2. Test effect
aht_humi; int8_t aht_err; DHT11_Data_TypeDef DHT11_Data; Hardware_Iint(); printf("at_start_a403a board testing 2024-02-16\r\n"); printf("at_start_a403a board module aht10-oled \r\n"); OLED_Show_Example(); while(1) { if( DHT11_Read_TempAndHumidity ( & DHT11_Data ) == SUCCESS) { Temperature = DHT11_Data.temp_int; Humidity = DHT11_Data.humi_int; } else { printf("Read DHT11 ERROR!\r\n"); } printf(" temperature=%d,humidity= %d \r\n" ,Temperature,Humidity); delay_ms(500); if (!i2c_CheckDevice(BH1750_Addr)) { Light = LIght_Intensity(); } printf("Light_Value:%.1fLx\r\n",Light); delay_ms(500); OLED_ShowNumber_UnsignedInteger_06x08(32,4,Temperature,2); OLED_ShowNumber_UnsignedInteger_06x 08( 100,4,Humidity,2); OLED_ShowNumber_Float_06x08(40,5,Light,5,1); } } ``` 2. Test effect