Notifications
Clear all

10/18/2023 Map Stopped Working?
Visit this post for the fix

[Sticky] Information on Initial Setup of LiveSectional Image

1 Posts
1 Users
0 Reactions
1,651 Views
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 557
Topic starter  
The image has been setup with the latest version as of the release of LiveSectional v3.1
pi@LiveSectionalV3:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster

The dependencies needed to run the related software, such as NeoPixel, Flask, RPi.GPIO, PIL, smbus2 etc have already been installed. Therefore unless you alter the scripts, or use devices that haven't been tested, there should be no reason to install any dependencies. But if you like to tinker, the information below may be helpful.
 
Directory Structure
Below is the directory structure of the files used in LiveSectional v3.1. This project has been created so that the builder would have very little command line work. Most everything done except the initial setup is conducted through a web browser on the same network as the Raspberry Pi (RPI). But for those interested in the directory structure;
  • /NeoSectional
    • config.py - file that holds all the user defined settings.   
    • startup.py - this file is called by the rc.local at startup and depending on settings in config.py will thread both metar-v31.py and metar-display-v31.py
    • metar-v31.py - main program that runs the addressable LED's
    • metar-display-v31.py - secondary program that runs an LCD or OLED displays if installed
    • airports - database of airports used by the LED's on the map
    • shutoff.py - used when rebooted or shutdown to turn off all the LED's and any display (LCD or OLEDS) if used.
    • webapp.py - Flask app used to run and support the airport and configuration editors.
    • /templates
      • apedit.html - Flask Template for editing the airports file.
      • confedit.html - Flask Template for editing the configuration file.
    • /static
      • style.css - CSS style for html files
      • banner3.png - Banner image for web pages
      • tab.ico - Small icon file for the browser tab
  • /etc
    • rc.local - run at startup
 
Initial Setup Overview
This information is detailed elsewhere but for a quick review its included here. Download the SD card image from www.livesectional.com. Burn image to the sd card using balenaEtcher, https://www.balena.io/etcher/ . Install card into the Raspberry Pi (RPI).
 
Startup RPI for its first boot. A message will come up with instructions. These instructions explain to the user to run raspi-config to setup the wifi network name and password and to expand the file system to utilize the entire storage of the SD card that is being used. When it asks if you would like to Reboot Now, select Yes.
 
To verify that the wireless connection is setup properly, after reboot enter;
     pi@LiveSectionalV31:~ $ ping www.google.com
 
You should see results similar to;
PING www.google.com (216.58.193.196) 56(84) bytes of data.
     64 bytes from lax02s23-in-f4.1e100.net (216.58.193.196): icmp_seq=1 ttl=55 time=44.5 ms
     64 bytes from lax02s23-in-f4.1e100.net (216.58.193.196): icmp_seq=2 ttl=55 time=45.10 ms
     64 bytes from lax02s23-in-f4.1e100.net (216.58.193.196): icmp_seq=3 ttl=55 time=45.6 ms
     64 bytes from lax02s23-in-f4.1e100.net (216.58.193.196): icmp_seq=4 ttl=55 time=44.5 ms
 
Hit Cntrl-z to quit.
 
If you see this, then the wireless connection is working properly. 
 
Now its time to get the RPI's IP address. For more information on doing this via command line visit this page.
 
When RPI boots up after Wifi setup, webapp.py will display the IP Address that is running and give you the URL to enter into a web browser to configure your map. For instance it will report; 
**********************************************
    My IP Address is 192.169.84.23
**********************************************
Configure your LiveSectional by opening a
browser to http://192.169.84.23:5000/confedit
**********************************************
 Write down the IP address  and URL for later use.
 
Configuration
At this point the user can open any web browser that is connected to the same network as the RPI and enter 'IP Address:5000/confedit'. Be sure to replace the 'IP Address' with the IP Address you just wrote down from the previous step.
 
This utility will help to set up the way the map behaves. Read the explanation for each setting and try different configurations until it works as desired.
 
Edit Airports
Once the configuration setting have been saved, click on the 'Edit Airports' button (or enter 'IP Address:5000/apfedit' into the browser). This will bring up a second utility that will allow the user to create the 'airports' file and save it.
 
Display Hardware
The LiveSectional v3.1 has been written to accommodate either a single 16x2 LCD or SSD1306 128x64 I2C OLED display, or multiple OLED displays if desired. If more than 1 OLED is to be used, a TCA9548A Multiplexer must be installed as well. Below are links to each type of display and multiplexer.
 OLED's provide a very nice and readable display. LCD modules are tried and true technology. Each have their advantages and disadvantages. I prefer the OLED displays.
 
If using an LCD, the script will scroll the airport's identifier and wind speed and direction. It can be configured to scroll a set number of airports regardless of the wind speed or just the airports whose wind speed are above a set speed.  It will also show an arrow designating the direction from which the wind is blowing from 8 cardinal coordinates of the compass.
 
Using a single OLED display will simply rotate through the airports and their winds. An arrow will be shown with the general direction from which the wind is blowing. 
 
If multiple OLED's are going to be used, a Multiplexer must be used as well. Simply speaking, each OLED has an address used to send information. However every OLED uses the same address. So a multiplexer is used to determine which OLED to send the desired information. A Multiplexer allows the use of up to 8 OLED displays. In the settings the number of displays will need to be properly set.
 
With multiple OLED's the information will populate each OLED and then scroll across the screens. 
 
It is strongly suggested that if more than 1 OLED is to be used, start by wiring a single OLED and verify proper operation then add the multiplexer and extra OLED's to the project.

   
Quote
Share: