GithubHelp home page GithubHelp logo

nightrang3r / p4wnp1_aloa_lcd_menu Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 10.68 MB

This project is a fork of the P4wnP1_ALOA_OLED_MENU_V2 by BeBoXoS. It has been updated to Python 3 and modified for compatibility with the Waveshare 1.3inch LCD HAT for Raspberry Pi.

Python 96.59% Shell 3.41%

p4wnp1_aloa_lcd_menu's Introduction

P4wnP1_ALOA_LCD_MENU

Introduction

This project is a fork of the P4wnP1_ALOA_OLED_MENU_V2 by BeBoXoS. It has been updated to Python 3 and modified for compatibility with the Waveshare 1.3inch LCD HAT for Raspberry Pi. More information about this LCD HAT is available here.

LCD Specifications:

  • Driver: ST7789
  • Interface: SPI
  • Resolution: 240x240

Installation Instructions

Prerequisites

Installation Steps

  • Connect to your P4wnP1 ALOHA via usb and ssh into it.
  • Login to the P4wnP1 ALOHA via web interface at http://172.16.0.1:8000/ and go to the "WIFI SETTINGS" tab.
  • You will need to connect to your WIFI network as "Station (Client)" mode for the installation to work.

Then run the following commands:

git clone https://github.com/NightRang3r/P4wnP1_ALOA_LCD_MENU.git
cd P4wnP1_ALOA_LCD_MENU
./install.sh

Compatibility

  • The script may be compatible with other Waveshare LCD displays, but adjustments to the gui.py file will likely be necessary.

Configuration Steps

  1. Display Driver Modification

    Update the driver in gui.py:

    from luma.lcd.device import st7789  # Change to your display driver

2. **Setting Display Dimensions**

   Configure the display width and height in `gui.py`:

   ```python
   width = 240  # Change to your display width
   height = 240  # Change to your display height
   ```

3. **Pin Configuration**

   Adjust the PIN settings to match your LCD display:

   ```python
   RST = 27
   CS = 8
   DC = 25

   # GPIO definition and LCD configuration
   RST_PIN = 27  # Waveshare settings
   CS_PIN = 8    # Waveshare settings
   DC_PIN = 25   # Waveshare settings
   KEY_UP_PIN = 6     # Stick up
   KEY_DOWN_PIN = 19  # Stick down
   KEY_LEFT_PIN = 5   # Stick left / go back
   KEY_RIGHT_PIN = 26 # Stick right / go in / validate
   KEY_PRESS_PIN = 13 # Stick center button
   KEY1_PIN = 21      # Key 1 / up
   KEY2_PIN = 20      # Key 2 / cancel/go back
   KEY3_PIN = 16      # Key 3 / down
   USER_I2C = 0       # Set to 1 if your OLED is I2C or 0 if using SPI interface
   ```

4. **Adjusting Padding**

   Modify padding values if text is overlapping:

   ```python
   padding = -2
   top = padding
   bottom = height - padding
   line1 = top
   line2 = top + 20
   line3 = top + 40
   line4 = top + 60
   line5 = top + 80
   line6 = top + 100
   line7 = top + 120
   brightness = 255  # Max brightness
   ```

5. **SPI Configuration**

   Update SPI settings and PINs:

   ```python
   serial = spi(device=0, port=0, gpio_DC=25, gpio_RST=27)
   ```

6. **Splash Image Size Adjustment**

   Configure the display size for the splash image. You may need to resize the image in the image folder to match your display size:

   ```python
   device.width = 240
   device.height = 240
   c = (240 - 220) / 2
   f = (240 - 350) / 2
   ```

p4wnp1_aloa_lcd_menu's People

Contributors

nightrang3r avatar

Stargazers

 avatar Moe Sizzlik avatar

Watchers

 avatar

p4wnp1_aloa_lcd_menu's Issues

Trouble with getting dependencies installed

Like the title says, I'm having trouble with getting the dependencies to install. Been fighting with getting a p4wnp1 working with either a WaveShare 1.3 LCD hat or their 1.44 LCD hat for a while now. Surprisingly isn't a whole lot of current into on this.
Errors (shortened some so to not input so much info here):

Errors were encountered while processing:
 python3-more-itertools
 python3-jaraco.classes
 python3-jaraco.functools
 python3-itsdangerous
 python3-zipp
 dhcpcd-base
 python3-typing-extensions
 python3-keyrings.alt
 python3-keyring
 iodine
 dbus-system-bus-common
 python3-asgiref
 python3-blinker
 python3-importlib-metadata
 python3-importlib-resources
 python3-flask
 python3-click
 dbus
 dhcpcd
 avahi-daemon
 libpam-systemd:armel
 dhcpcd5
 dbus-user-session
E: Sub-process /usr/bin/dpkg returned an error code (1)

And for each one of those packages is an error like this:

dpkg: error processing package python3-jaraco.classes (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-jaraco.functools:
 python3-jaraco.functools depends on python3-more-itertools; however:
  Package python3-more-itertools is not configured yet.

Some have errors like this:

Setting up python3-more-itertools (10.3.0-1) ...
  File "/usr/lib/python3/dist-packages/more_itertools/recipes.py", line 885
    yield (i := seq_index(value, i + 1, stop))
             ^
SyntaxError: invalid syntax

dpkg: error processing package python3-more-itertools (--configure):
 installed python3-more-itertools package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of python3-jaraco.classes:
 python3-jaraco.classes depends on python3-more-itertools; however:
  Package python3-more-itertools is not configured yet.

I know it's a long shot of getting any help here, but it would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.