Meh Belly Lint Collection

That awful moment when you realize,
THIS is YOUR circus and THOSE are YOUR monkeys.

User Tools

Site Tools


server_status_oled_display

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
server_status_oled_display [2025/03/23 01:19] kensonserver_status_oled_display [2026/05/06 04:56] (current) kenson
Line 12: Line 12:
   * The OLED's I2C address 0x3C, and I'm using adafruit's 1306 driver, mainly for display rotation support.   * The OLED's I2C address 0x3C, and I'm using adafruit's 1306 driver, mainly for display rotation support.
   * The Accelerometer's address is 0x1C and the adafruit MMA8541 driver is basic but functional. Note that the more advanced features (e.g. tap to click) built into the chip are unavailable with this library.   * The Accelerometer's address is 0x1C and the adafruit MMA8541 driver is basic but functional. Note that the more advanced features (e.g. tap to click) built into the chip are unavailable with this library.
 +
 +
 +====== TLDR; ======
 +
 +
 +Probe the port.
 +
 +<code>
 +sudo tee ./probe_displayinator.py >/dev/null <<'EOF'
 +#!/usr/bin/env bash
 +set -u
 +
 +BAUD=115200
 +
 +for PORT in /dev/ttyUSB* /dev/ttyACM*; do
 +    [ -e "$PORT" ] || continue
 +
 +    echo "========================================"
 +    echo "Probing $PORT"
 +
 +    if ! stty -F "$PORT" "$BAUD" raw -echo -echoe -echok -echoctl -echoke 2>/dev/null; then
 +        echo "Could not configure $PORT"
 +        continue
 +    fi
 +
 +    # Some Arduino/32U4-style boards reset when serial opens
 +    sleep 4
 +
 +    # Wake / clear any stale output
 +    printf '\n' > "$PORT"
 +    sleep 0.2
 +    timeout 1 cat "$PORT" >/dev/null 2>&1
 +
 +    # Ask version
 +    printf '!VER\n' > "$PORT"
 +
 +    echo "Response from $PORT:"
 +    timeout 2 cat "$PORT" || true
 +    echo
 +done
 +EOF
 +chmod +x probe_displayinator.py
 +./probe_displayinator.py
 +</code>
 +
 +Download the agent: {{ :displayinatorhostip.zip |}}
 +<code>
 +wget 'https://mehngineering.com/wiki/lib/exe/fetch.php?media=displayinatorhostip.zip' -O displayinatorhostip.zip
 +unzip displayinatorhostip.zip
 +</code>
 +
 +Insert the service to autostart
 +<code>
 +sudo tee /etc/systemd/system/displayinator.service >/dev/null <<'EOF'
 +[Unit]
 +Description=Displayinator Host IP Sender
 +Wants=network-online.target
 +After=network-online.target multi-user.target
 +
 +[Service]
 +Type=oneshot
 +WorkingDirectory=/root
 +ExecStartPre=/bin/sleep 10
 +ExecStart=/usr/bin/python3 /root/DisplayinatorHostIP.py --port /dev/ttyACM0
 +StandardOutput=append:/var/log/displayinator-hostip.log
 +StandardError=append:/var/log/displayinator-hostip.log
 +
 +[Install]
 +WantedBy=multi-user.target
 +EOF
 +</code>
 +
 +Edit /etc/systemd/system/displayinator.service and change the port to whatever device the probe finds, usually /dev/ttyACM0 or /dev/ttyUSB0
 +<code>ExecStart=/usr/bin/python3 /root/DisplayinatorHostIP.py --port /dev/ttyACM0
 +</code>
 +
 +Start the service.
 +
 +<code>
 +systemctl daemon-reload
 +systemctl enable --now displayinator.service
 +systemctl status displayinator.service
 +</code>
  
 ==== Loading the Arduino Bootloader ==== ==== Loading the Arduino Bootloader ====
Line 20: Line 103:
  
 avrdude will complain about older firmware but my recommendation is to ignore it. avrdude will complain about older firmware but my recommendation is to ignore it.
-The TLDR; is the chinese firmware is modified and does some automagic stuff and in general works more reliably than the publicly available open source code version.+The [[USBasp flash|TLDR;]] is the chinese firmware is modified and does some automagic stuff and in general works more reliably than the publicly available open source code version.
  
 Use zadig to make it (USBasp) use libusb-win32 Use zadig to make it (USBasp) use libusb-win32
server_status_oled_display.1742692787.txt.gz · Last modified: 2025/03/23 01:19 by kenson

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki