Lark Weather Station with Unihiker

userHead Mark.Rupp 2024-03-07 12:02:34 924 Views2 Replies

I am attempting to use the Lark Weather Station (LWS) with Unihiker. Using Jupyter on Unihiker, I have updated the Python code for the LWS by inserting, at the top, the “DFRobot_LarkWeatherStation.py” code from Github. I then SSHed into Unihiker and did a "pip3 install RPi.GPIO". I connected Unihiker to LWS and a power source and booted to the main menu on Unihiker. I then executed the python LWS code, only to get a message that RPi.GPIO can only be executed from a Raspberry Pi! Please advise. 

 

(I erroneously posted this as a reply to another post, my apologies)

2024-03-08 03:47:11

I am confused: From where does one install the DFRobot_Atmospherlum module for Unihiker? I am using Jupyter on Unihiker.

userHeadPic Mark.Rupp
2024-03-07 17:43:25

RPi.GPIO is a hardware driver library for the Raspberry Pi and cannot be utilized on non-Raspberry Pi controllers.
UNIHIKER is underpinned by Debian, and the co-processor is the GD32, so you can use the Pinpong libraries to call the GPIOs of the GD32 to drive peripheral hardware.

 

Lark's wiki has sample code for UNIHIKER. You can copy it directly into Jupyter and run it.

 

wiki:

https://wiki.dfrobot.com/SKU_EDU0157_EN_Lark_Weather_Station#target_5

userHeadPic Yeez_B