Reference
Library
- Arduino/Raspberry Pi: DFRobot_LarkWeatherStation
- UNIHIKER: Lark Weather Station Library
- micro:bit/Makecode: pxt-DFRobot_lark
Communication Protocol Description
- Communication Modes: I2C (default) or UART.
- UART Configuration: Baud rate fixed at 115200.
- I2C Address: Default address is
0x42.
API Description
| Function | Description |
|---|---|
DFRobot_LarkWeatherStation_I2C(addr, &Wire) |
Initialize I2C communication with the specified device address. |
atm.begin() |
Initialize the Lark Weather Station. Returns 0 on success. |
atm.getTimeStamp() |
Get the current time stamp (YYYY-MM-DD HH:MM:SS). |
atm.getValue("Parameter") |
Get the value of a specified parameter (e.g., "Speed", "Temp", "O2"). |
atm.getUnit("Parameter") |
Get the unit of a specified parameter (e.g., "m/s", "℃", "%vol"). |
yunque_i2c.set_local_time() |
Synchronize UNIHIKER’s system time with the Lark Weather Station (Python). |
MakeCode Block Module Description
- Lark Initialization: Initializes communication with the Lark Weather Station.
- Get Weather Data: Select a physical quantity (e.g., wind speed, temperature) from the dropdown menu to retrieve its value.
- Display Data: Use micro:bit’s LED matrix to display the retrieved weather data.
Principle
The Lark Weather Station integrates high-quality sensors to measure wind speed (anemometer), wind direction (wind vane), temperature, humidity, and air pressure (combined sensor). Data is transmitted via I2C/UART and can be stored locally (16M USB disk) or processed by external controllers.
Other Supplementary Information
Parameter Configuration
Connect the Lark Weather Station to a computer via Type-C to modify the config file. Configurable parameters include:
Communication: I2C/UART (default: I2C)Sample_rate: Data sampling rate (1-60S or 1-60M, default: 30S)Record: Enable/disable data recording (ON/OFF, default: ON)Delay_record: Delay before first data recording (10~60S, default: 10S)Light_Switch: Enable/disable RGB light (ON/OFF, default: OFF)Low_Power: Enable/disable low-power mode (ON/OFF, default: OFF)
Changes take effect after a reboot.
Firmware Upgrade
- Back up data from the Lark Weather Station’s USB drive.
- Press the firmware upgrade button (located at the bottom) and connect to a computer.
- Drag the latest
.uf2firmware file to the "RPI-RP2" USB drive.
Low Power Mode
- Enabled by setting
Low_Power:ON. - Disables I2C/UART communication.
- Minimum sampling rate: 60 seconds.
- Wakes up to record data when the wind vane detects motion.
RGB Indicator Lights
- Yellow: System initializing (≈1 second).
- Red: System anomaly (e.g., invalid config).
- Green: I2C communication mode.
- Blue: UART communication mode.
- Flashing Green/Blue: Data is being stored.
System Time Setting
- Via Config File: Add
Time:YYYY/MM/DD/HH:MM:SSto theconfigfile (e.g.,Time:2023/07/24/17:56:15). - Via Code: Use
atm.setTime(YYYY, MM, DD, HH, MM, SS)(Arduino) oryunque_i2c.set_local_time()(UNIHIKER).
Sensor Expansion
The Lark Weather Station supports two Gravity I2C expansion interfaces. To expand sensors:
- Remove the bottom screws and open the expansion bay.
- Connect additional sensors (e.g., oxygen, ozone, PM2.5).
- Reassemble the weather station.
Expandable Sensors:
| SKU | Sensor | Physical Quantity | Name Tag |
|---|---|---|---|
| SEN0228 | Ambient Light Sensor | Ambient Light | Light |
| SEN0322 | Oxygen Sensor | Oxygen Concentration | O2 |
| SEN0321 | Ozone Sensor | Ozone Concentration | O3 |
| SEN0460 | PM2.5 Sensor | PM1.0/PM2.5/PM10 | PM2.5 |
Data Acquisition Example (Oxygen Sensor SEN0322):
Serial.print(atm.getValue("O2"));
Serial.println(atm.getUnit("O2"));
More documents
Was this article helpful?
