-
1Set Up
Connect the 4DPi-35 to Raspberry Pi 3.
![web.png]()
-
2Program
Recommended application to use for SSH connection:
Mobaxterm - https://mobaxterm.mobatek.net/download-home-edition.html
Steps in Raspberry Pi Weather Station
wget https://launchpad.net/python-weather-api/trunk/0.3.8/+download/pywapi-0.3.8.tar.gz
When download is complete. Untar the file
sudo tar -xzvf pywapi-0.3.8.tar.gz
cd pywapi-0.3.8sudo python setup.py buildsudo python setup.py installcd ~dpkg-reconfigure tzdatawget http://www.instructables.com/files/orig/FAQ/7BWL/I1NULEIL/FAQ7BWLI1NULEIL.zipsudo unzip FAQ7BWLI1NULEIL.zipcd Weathersudo nano weather.py
"""# Larger Displayself.xmax = 800 - 35self.ymax = 600 - 5self.scaleIcon = True # Weather icons need scaling.self.iconScale = 1.5 # Icon scale amount.self.subwinTh = 0.05 # Sub window text heightself.tmdateTh = 0.100 # Time & Date Text Heightself.tmdateSmTh = 0.06self.tmdateYPos = 10 # Time & Date Y Positionself.tmdateYPosSm = 18 # Time & Date Y Position Small"""# Small Displayself.xmax = 480 - 20self.ymax = 320 - 5self.scaleIcon = False # No icon scaling needed.self.iconScale = 1.0self.subwinTh = 0.065 # Sub window text heightself.tmdateTh = 0.120 # Time & Date Text Heightself.tmdateSmTh = 0.075self.tmdateYPos = 1 # Time & Date Y Positionself.tmdateYPosSm = 8 # Time & Date Y Position SmallAnd change with
self.w = pywapi.get_weather_from_weather_com(‘ASNS0055’, units='metric' )This will change to the desired location by replacing the value ‘48085’ to ‘ASNS0055’and the units to be use from ‘imperial’ to ‘metric’. You can find your location by visiting weather.com.
Ctrl + x
Press Y, and enter.
python weather.pycd Weatherpython weather.pysudo nano .config/lxsession/LXDE-pi/autostart@lxterminalGo to the bottom of the last line and add the line below. Save and exit.
Then we need to open the terminal after the raspberry pi boots up. To do this type the code below.
If all are correct, set to run after boot up. Edit the file .bashrc, this will be executed when you open the terminal. Go to the bottom of the file and add the lines below. Save and exit.
Test the file by typing,
Save the file,
Look for the line
w = pywapi.get_weather_from_weather_com( '48085', units='imperial' )Look for the line # Larger Display and put “”” before the line to uncomment and look for the line tmdateYPosSm = 8 # Time & Date Y Position Small and delete the “”” below. This will use the small display. It should look like the code below.
Open the file weather.py
Go to the folder
Unzip the file
Download he Raspberry Pi Internet Weather Station by
Reconfigure tzdata
Go back to the folder /home/pi
Install
Build
Go to the folder
When installation is successful, connect thru SSH and download python weather api.
Connect to SSH, download and install the 4DPi-Kernel. Follow the instruction on the 4DPi-35 II Datasheet.
Set up network connections (https://www.raspberrypi.org/documentation/configuration/wireless/README.md), Enable SSH (https://www.raspberrypi.org/documentation/remote-access/ssh/README.md), change password and restart.
Install the latest raspbian OS that is available on the Raspberry Pi website . Follow the installation guide.
![web2.png]()
4D Makers

Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Hello,
is it possible to get the video output to hdmi, to connect an external display?
thank you!
Are you sure? yes | no
Hello, I tried to used this with the official 7" Touchscreen for Rasp and unfortunatly it show an error message : "no suitable video driver found" ... my system is update. Does someone can help me ?
Are you sure? yes | no