Raspberry Pi Weather Station Board
Device Discovery
-
To use this device, you will need to enable I2C support on your Raspberry Pi as described in the Weather Station Board manual. The I2C board address for this device is 0x4e. You can verify that the device is present by running the following command from a terminal:
$ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 4e --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Opening the Device
DeviceOpen["weatherstation"]
opens the device for reading data.
Reading Data
DeviceRead[obj,"Temperature"]
reads the current temperature from the device.
DeviceRead[obj,"Pressure"]
reads the current barometric pressure from the device.
DeviceRead[obj,"Humidity"]
reads the current relative humidity from the device.
Closing and Releasing Resources
DeviceClose[obj]
closes the device connection.
Examples
Basic Examples (1)
obj = DeviceOpen["weatherstation"]This reads the current temperature:
DeviceRead[obj, "Temperature"]This reads the current barometric pressure:
DeviceRead[obj, "Pressure"]This reads the current relative humidity:
DeviceRead[obj, "Humidity"]DeviceClose[obj]Related Guides
History
Introduced in 2014 (10.0)