Skip to main content

Neopolitan: a library for displaying text on LED boards

Project description

neopolitan

A library for displaying "text" on LED boards

Description

This is a revamp of stockticker, which queries real-time stock price data, calculates daily fluctuations, and displays it on an LED board. While the end result of that project was cool, this project aims to clarify much of the data display code and make it usable to display any inputted message. See this sub-readme for an introduction to how data can be used to make the board display "human-readable" text.

Given that access to hardware boards can be constrictive and testing can be difficult, this project aims to support data display on a graphical interface so that anyone can access it. pygame is used to display the graphical display, while the neopixel (hence the project name) library is used to interface with the hardware board. The switch between these two displays is OS-dependent.

Installation

[python3 -m] pip install neopolitan

Usage

Make sure to exit the program by pressing the window close "X", instead of ctrl+c

  • To run the program
    from neopolitan.neop import main as main_function
    main_function()
    
  • To demo live-update functionality
    import neopolitan.testboardrunner
    
  • To run the program with arguments
    from queue import Queue
    
    q = Queue() # Initialize the input events queue
    q.put('say This is a demo statement') # Set the message: 'say {message (spaces okay)}'
    q.put('speed fast') # Set the scroll speed: 'speed {slow/medium/fast}'
    q.put('wrap True') # Set whether message wraps when done displaying: 'wrap {True/False};
    
    from neopolitan.neop import main
    main(events=q) # Run main with the specified events
    

https://github.com/alyoshenka/neopolitan/assets/38815390/1e98261b-8dfb-48e3-943b-34b49878c55f

  • See this code for an example of how to send live updates in the package

Command Line Arguments

Note: This code only works from source, NOT the package install

python[3] neopolitan/main.py {args}

  • --message/-m {message_to_display}
    • Displays the given message on the board (enclose in quotes if multiple words)
  • --scroll-speed/-s {slow/medium/fast}
    • Controls how quickly the display scrolls across the screen
  • --wrap/-w {True/False}
    • Determines whether the display should "wrap around" when it gets to the end, or just show a blank screen

todo: command line examples (w/ vids?)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neopolitan-0.1.21.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

neopolitan-0.1.21-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file neopolitan-0.1.21.tar.gz.

File metadata

  • Download URL: neopolitan-0.1.21.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for neopolitan-0.1.21.tar.gz
Algorithm Hash digest
SHA256 756f0a84318c7afa1f378b4602e10f551ec310bcf2023618fefb2cfd4e379deb
MD5 43991afcbdb19e2a687e231b13087ea4
BLAKE2b-256 8dd1eb644c0bdd2dc1cf3f2a72cd385039f7022fe98a2f978246608a969e6932

See more details on using hashes here.

File details

Details for the file neopolitan-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: neopolitan-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for neopolitan-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 b9c43a4765545de214abcc227d109395b661cb0009c39e88663cb2d77d655bf3
MD5 415bbf8ee4845717efc8a1fd44e1ba0f
BLAKE2b-256 8818e7b7bc18b1734733c313e018d66f842e1ae49835f16adf2b09e982864e63

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page