Introduction: Weather Display Using Arduino and Raspberry Pi

This project is weather display system using 16*2 lcd, arduino ,raspberry pi,internet

building this project is very easy need very less assembly

It was display the weather in any ware in world on 16*2,you can adjust what you want to display like humidity ,forecast ,high temp,low temp,visibility ,pressure ...etc

Step 1: Start Building

Requirements

16*2 LCD,arduino board or atmega 8/16/32,raspberry pi,arduino IDE, "yweather python module "

1. Before doing hardware assembly setup the software

  • you have to install yweather module in python in Rpi/system
  • Yweather means yahoo weather module for python for fetching weather from internet ,yweather is simple module ,easy to understand
  • to install type this in your python pip console "pip install yweather"
  • or download yweather module in system from this link

    https://pypi.python.org/pypi/yweather/

  • extract the lib compressed files then type "python setup.py install"

2.Connect the 16*2 LCD to arduino

3.Then compile the code arduino code in IDE and dump it to your arduino (file attached to this post see attachments)

4.After this connect the Arduino to to Rpi/PC using usb or tty serial pin in your GPIO pins,ard power up the arduino

4.Then open your any text editor /or python idle in Rpi or system

  • in you are in ssh console to your RPi use nano text editor
  • Compile & run the python code in Rpi/pc
  • .
  • see the options for editing the python codei in next step

Step 2: Editing the Code

  • In python code modify the "city = "and "country=" to your region place
  • In python code Modify the serial port in code serial.Serial("/dev/ttyACM0")
  • to know the serial port of arduino in PC goto device manger and open the communication ports and you can see the arduino port looking like this "COM3" then replace the "serial.Serial("/dev/ttyACM0") with serial.Serial("COM3")
  • in Rpi/Linux system Communication ports looks like this "/dev/ttyUSB"or "/dev/ttyACM0",know you arduino port and modify the this line in code "serial.Serial("/dev/ttyACMo")
  • the default weather update interval is 2 minuets ,you can modify the this in last line in your code "time.sleep(sec)" (sec how many sec to sleep)
  • this is infinite loop run continuously to stop this press "CTRL+C"
  • If you want to change info in 16*2 lcd ,construct the string like "cordinateof lcd cursor [SPACE] your info " Example: "82 V-nath" displayed v-nath from 8th row and 2nd column coordinate must like this"[row][column]"
  • write that string to serial communication using serial.write(string)
  • the yweather library return the dict of weather you can examine that dictionary file you can modify the info in LCD
Arduino All The Things! Contest

Participated in the
Arduino All The Things! Contest