Close
0%
0%

Weather Ticker

It continuously displays the weather conditions, and the weather forecast for the next few days

Similar projects worth following
This is a fun project for a beginner. It has a hardware side (buying components, soldering, connecting wires) and well as using shell scripts, crontabs, and some Python code.

Still what makes this project 'beginner friendly' is the 'zero setup' feature: you prepare the micro SD card exclusively on your PC (running a provided install.sh script) , and... you are done.
You just insert the memory card in your raspberry pi, and the startup.sh script / crontab do the rest (install packages, upgrade code: no need to ssh into the raspberry pi)

The 'zero setup' also helps you quickly switch from one project to another by simply reinstalling everything on the memory card.

In the end this project found a place in my office, next to the printer. My colleagues love it. They now know how to dress according to the weather outside when they go out for lunch. Some colleagues even have expressed their new interest in building similar projects.

The weather ticker v2 projects has the following features:

  • 'zero setup': you prepare the micro SD card on your PC (by simply running an installation script, available on github.com), you then insert it into the raspberry pi, and you are ready to go (no manual setup on the device needed!)
  • the installation script sets up the raspbian OS, expands the FS, enable spi, installs the code, prepares the WI-FI files, crontab jobs etc
  • on the first boot the device updates itself with the needed packages
  • on each reboot the code is updated from github.com (so you can very easily upgrade the code: you just push it to the github.com, and restart the device)
  • the weather conditions are updated from yahoo.com (every 5 min)
  • using two "4 in 1" arrays of MAX7219 LED dot matrix makes the hardware setup much easier (than using individual LED matrices)
  • easy WI-FI credentials editing (even using a Windows machine)

  • 1 × raspberry pi zero
  • 1 × wifi usb dongle
  • 2 × MAX7219 4 in 1 dot matrix arrays
  • 1 × wood ruler
  • 1 × micro SD card >= 8Gb

  • 1
    Step 1

    Steps

    1. you put together the hardware
    2. you download the code from https://github.com/petrum/rpi
    3. you prepare a local file with the WI-FI details
    4. you run an installation script (provided) that will setup the micro SD card
    5. you insert in the micro SD card in raspberry pi, power up and enjoy!

    Step 1.

    Buy the components:

    • raspberry pi zero
    • 8 Gb micro SD card
    • wi-fi usb dongle
    • two '4 in 1' MAX7219 LED dot matrix arrays
    • micro USB cable
    • power supply
    • soldering tools
    • jumper wires (they could come with the MAX7219)
    1. you solder together the 2 LED arrays (in a chain, the out of one is the in of the other )
    2. you solder the pins on the raspberry pi zero (for help check the 'GPIO pin-outs' section https://github.com/rm-hull/max7219)
    3. you connect the input pins of one array with the raspberry pi
    Board Pin Name 	Remarks 	RPi Pin	RPi Function
            1 VCC 	+5V Power 	      2 5V0
            2 GND 	Ground 	              6 GND
            3 DIN 	Data In 	     19 GPIO 10 (MOSI)
            4 CS 	Chip Select 	     24 GPIO 8 (SPI CE0)
            5 CLK 	Clock 	             23 GPIO 11 (SPI CLK)

    Step 2.

    You get the source code from github.com.

    The code consists in a few bash scripts, and some Python code:

    petrum@nuc ~$ mkdir github
    petrum@nuc ~$ cd github/
    petrum@nuc ~/github$ git clone https://github.com/petrum/rpi.git
    Cloning into 'rpi'...
    remote: Counting objects: 862, done.
    remote: Compressing objects: 100% (14/14), done.
    remote: Total 862 (delta 4), reused 0 (delta 0), pack-reused 848
    Receiving objects: 100% (862/862), 4.43 MiB | 0 bytes/s, done.
    Resolving deltas: 100% (517/517), done.
    Checking connectivity... done.
    petrum@nuc ~/github$ ls -ltr 
    total 4
    drwxrwxr-x 9 petrum petrum 4096 Oct 12 06:57 rpi
    petrum@nuc ~/github$ cd rpi/weather2/
    petrum@nuc ~/github/rpi/weather2[master]$ 
    

    Step 3.

    The installation script (rpi/weather2/install.sh) refers to the local ~/rpi-private/wpa_supplicant.conf.

    You'll have to create this file (using rpi/net/wpa_supplicant.conf as a template), and type in your WI-FI details.

    Note: After installation (step #4) this file should be available on the micro SD card, on the /boot FAT partition.

    (so you can easily edit it even from a Windows laptop when you need to change the WI-FI details)

    Step 4.

    You need to download locally a recent version of the Raspbian OS.

    Go to https://www.raspberrypi.org/downloads/raspbian/ and download the Raspbian Jessie Lite version.

    Example:

    /home/petrum/Downloads/2016-09-23-raspbian-jessie-lite.img
    Note: you have to edit the rpi/weather2/install.sh script with your local image location.

    Insert a micro SD card into your Linux desktop, cd to rpi/weather2 folder, and run the install.sh script.

    The script will detect the memory card, and ask you for a confirmation if you want to proceed.

    Please really pay attention at this step: the script will next use the 'dd' command to write the OS image file to the memory card.

    Writing to the wrong card/disk could be disastrous!

    (some say 'dd' stands for... disk destroyer!)

    petrum@nuc ~/github/rpi/weather2[master]$ ./install.sh 
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 447.1G  0 disk 
    ├─sda1   8:1    0   156M  0 part /boot/efi
    ├─sda2   8:2    0    16G  0 part [SWAP]
    ├─sda3   8:3    0  39.5G  0 part /
    └─sda4   8:4    0 391.5G  0 part /home
    sdb      8:16   1   7.4G  0 disk 
    ├─sdb1   8:17   1    63M  0 part /media/petrum/boot                                                                                                      
    └─sdb2   8:18   1   1.2G  0 part /media/petrum/3598...61dff1d
    Using 'sdb'... Please confirm: [y/N]
    

    Make sure there are no errors.


    Step 5.

    Enjoy!

View all instructions

Enjoy this project?

Share

Discussions

Ivan Elias wrote 03/20/2019 at 17:52 point

Hi. very interesting your project. Does your raspberry have enough power to light up so many LEDs? or do you use an external energy source? regards

  Are you sure? yes | no

Ali Kocho-Williams wrote 03/01/2018 at 08:40 point

This looks like a great project. How do you tell Weather Underground your location for the weather? Or is it automatic?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates