Skip to content

Instantly share code, notes, and snippets.

View HeatfanJohn's full-sized avatar

John P Masseria HeatfanJohn

View GitHub Profile
@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
#!/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'
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 / CHIP setup
Last active May 6, 2019 22:13
NextThing CHIP initial setup instructions
nmcli d wifi list | more
sudo nmcli d wifi connect attwifi
mkdir .ssh
# from Linux host scp authorized_keys file
scp chip@<ip address of CHIP>:.ssh/id_rsa .ssh/id_rsa
scp chip@<ip address of CHIP>:.ssh/authorized_keys .ssh/authorized_keys
sudo apt-get update
sudo apt-get install git build-essential curl htop w3m
wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz
tar xf noip-duc-linux.tar.gz
rm noip-duc-linux.tar.gz
cd noip-2.1.9-1/
make
# Use sed to add the following after #! /bin/sh in debian.noip2.sh
sed -i -f - debian.noip2.sh <<EOF
2 i\\
# 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
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
@HeatfanJohn
HeatfanJohn / install_start_stop_daemon.sh
Created September 29, 2016 18:07 — forked from yuuichi-fujioka/install_start_stop_daemon.sh
install start-stop-daemon to centos, fedora, redhat.
#!/bin/bash
cd /usr/local/src
wget http://developer.axis.com/download/distribution/apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
tar zxvf apps-sys-utils-start-stop-daemon-IR1_9_18-2.tar.gz
cd apps/sys-utils/start-stop-daemon-IR1_9_18-2
gcc start-stop-daemon.c -o start-stop-daemon
cp start-stop-daemon /usr/sbin/
@HeatfanJohn
HeatfanJohn / NTC CHIP 4.4 Panic
Created September 26, 2016 18:44
NTC CHIP 4.4 Kernel Panic
[33290.435000] fe00: 00000031 c0215618 dfe593c0 400f0093 dfe593c0 00000017 dfe593c0 400f0093
[33290.435000] fe20: 00000000 db010300 00000031 db4e7700 d8e3fc80 dfe5cc00 00000000 cf0efe58
[33290.435000] fe40: c029d0f4 c029cae8 200f0093 ffffffff 00000000 db010300 dfe593c0 dfe5c544
[33290.435000] fe60: 00000000 c029d588 00000000 400f0093 00000000 dfe5c534 00000000 c0261c54
[33290.435000] fe80: c043b9e7 200f0013 00000000 c0fba580 c0fba4bc db4c0c00 00000031 c089ea4c
[33290.435000] fea0: db4e7700 db4c0c00 db4e7744 dfe5c518 00000001 0003b920 d8e3fc80 c089ebfc
[33290.435000] fec0: cf062ac0 c0fbe828 00000000 db1f2a80 cf062d54 1eea6000 cf0eff24 c0a5f644
[33290.435000] fee0: 00000010 dfe5c534 d8e3fc80 dfe5cc00 dfe60000 00000000 00000000 d8e3fc80
[33290.435000] ff00: dfe5cc00 c0260e94 dfe5cc00 dfe5cc14 cf0ee000 dfe5cc00 d8e3fc98 dfe5cc14
[33290.435000] ff20: cf0ee000 00000008 c10b5eb4 d8e3fc80 dfe5cc00 c02611ac c0fba100 d8e3fc80
@HeatfanJohn
HeatfanJohn / 4.3.0 Clean boot
Created September 26, 2016 18:43
4.3.0 NTC CHIP Clean boot log
Environment size: 2921/4194300 bytes
=> printenv bootcmd
bootcmd=gpio set PB2; if test -n ${fel_booted} && test -n ${scriptaddr}; then echo (FEL boot); source ${scriptaddr}; fi; mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload $fdt_addr_r /boot/sun5i-r8-chip.dtb; ubifsload $kernel_addr_r /boot/zImage; bootz $kernel_addr_r - $fdt_addr_r
=> setenv bootcmd=gpio set PB2; if test -n ${fel_booted} && test -n ${scriptaddr}; then echo (FEL boot); source ${scriptaddr}; fi; mtdparts; ubi part UBI; ubifsmount ubi0:rootfs; ubifsload $fdt_addr_r /boot/sun5i-r8-chip.dtb.bak; ubifsload $kernel_addr_r /boot/zImage.bak; bootz $kernel_addr_r - $fdt_addr_r
## Error: illegal character '='in variable name "bootcmd=gpio"
(FEL boot)
## Executing script at 43100000
Wrong image format for "source" command
device nand0 <sunxi-nand.0>, # parts = 5