Skip to content

Instantly share code, notes, and snippets.

View HeatfanJohn's full-sized avatar

John P Masseria HeatfanJohn

View GitHub Profile
#!/bin/bash
#
# This bash script dynamically sets the current tty's rows and cols
# to the device's physical size
#
# Below is typical call from ~/.bashrc
#if [ "/dev/ttyGS0" = "/dev/ttyGS0" ]; then
# export TERM='xterm'
# Add the following to the bottom of /boot/config.txt
dtoverlay=dwc2
enable_uart=1
# Change /boot/cmdline.txt to:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=161df949-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_multi
# Or for initial boot:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=402e4a57-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_multi quiet init=/usr/lib/raspi-config/init_resize.sh splash plymouth.ignore-serial-consoles
sudo vi /etc/hostname
sudo vi /etc/hosts
man hostname
sudo hostname myrpi3
hostname
uname -a
sudo init 0
passwd
mkdir .ssh
sudo apt-get update
@HeatfanJohn
HeatfanJohn / code.py
Last active January 13, 2023 22:41 — forked from wildestpixel/code.py
Pimoroni Pico Display Pack Circuitpython updated for version 7.0.0 running code
"""
adapted from http://helloraspberrypi.blogspot.com/2021/01/raspberry-pi-picocircuitpython-st7789.html
"""
import os
import board
import time
import terminalio
import displayio
import busio