Skip to content

Instantly share code, notes, and snippets.

View liamcottle's full-sized avatar

Liam Cottle liamcottle

View GitHub Profile
@liamcottle
liamcottle / README.md
Created January 8, 2025 08:16
TNCAttach + RNode TNC = LoRa IP

TNCAttach + RNode TNC = LoRa IP

Pi 4B <-> USB RNode TNC <-> LoRa 917.875MHz BW500kHz SF7 CR5 TXP17 <-> USB RNode TNC <-> Pi 4B <-> WiFi 2.4GHz (Internet)

Install System Dependencies

sudo apt install build-essential
sudo apt install python3-pip
@liamcottle
liamcottle / Heltec_T114_Display.ino
Created December 30, 2024 12:35
Heltec T114 Display in Arduino
/**
* Simple demo for using Heltec T114 Display
* Author: Liam Cottle <[email protected]>
*
* Install Heltec_nRF52 Board from GitHub
* - https://github.com/HelTecAutomation/Heltec_nRF52
*
* Once board is installed, you may need to "chmod +x" the following files:
* - ~/Documents/Arduino/hardware/heltec/Heltec_nRF52/tools/uf2conv/uf2conv.py
* - ~/Documents/Arduino/hardware/heltec/Heltec_nRF52/tools/adafruit-nrfutil/macos/adafruit-nrfutil
@liamcottle
liamcottle / meshchat_raspberry_pi.md
Last active May 10, 2025 16:40
MeshChat on Raspberry Pi 4
@liamcottle
liamcottle / Heltec_T114_Display_Slow_Bitmap_Drawing.ino
Last active December 30, 2024 12:36
Heltec T114 Display in Arduino (Slow Bitmap Drawing)
/**
* Simple demo for using Heltec T114 Display, but drawing bitmaps is slow :(
* Author: Liam Cottle <[email protected]>
*
* Install Heltec_nRF52 Board from GitHub
* - https://github.com/HelTecAutomation/Heltec_nRF52
*
* Once board is installed, you may need to "chmod +x" the following files:
* - ~/Documents/Arduino/hardware/heltec/Heltec_nRF52/tools/uf2conv/uf2conv.py
* - ~/Documents/Arduino/hardware/heltec/Heltec_nRF52/tools/adafruit-nrfutil/macos/adafruit-nrfutil
@liamcottle
liamcottle / main.py
Last active October 22, 2024 22:14
Raspberry Pi Pico - WiFi Controlled Relays
from machine import Pin
from phew import server, connect_to_wifi
# define relays
relays = {
1: machine.Pin(1, machine.Pin.OUT),
2: machine.Pin(2, machine.Pin.OUT),
3: machine.Pin(3, machine.Pin.OUT),
4: machine.Pin(4, machine.Pin.OUT),
5: machine.Pin(5, machine.Pin.OUT),
@liamcottle
liamcottle / meshchat_group_chats.md
Created September 25, 2024 01:52
MeshChat Group Chats

MeshChat Group Chats

A few thoughts on how I would build group chat functionality into MeshChat.

Do note, that this is not a true decentralised/distributed approach as the group chat server must be hosted by a single identity.

It would be nice for a truly distributed group chat, although when it comes to moderation, message retrieval and reliability, I think it would be too complex for an initial implementation.

Of course, everyone is welcome to build their own group chat system, these are just my ideas on what I'm thinking of implementing, nothing is set in stone :)

@liamcottle
liamcottle / README.md
Last active May 10, 2025 16:40
MeshPi

MeshPi

Setup a self hosted Meshtastic monitoring system on a Raspberry Pi with a Waveshare SX1262 LoRa Hat.

Upgrade System

sudo apt update
sudo apt upgrade
#include <MsgPack.h>
size_t maxEncryptedPackageMaxContentLength() {
// LXMF overhead is 111 bytes per message:
// 16 bytes for destination hash
// 16 bytes for source hash
// 64 bytes for Ed25519 signature
// 8 bytes for timestamp
// 7 bytes for msgpack structure
@liamcottle
liamcottle / ss_mod.sh
Created April 3, 2023 08:25
Mod StorySave
# This script mods StorySave to bypass checkpoint_required/challenge_required in 2023
# exit when any command fails
set -e
# make sure StorySave.apk exists
if [ ! -f "StorySave.apk" ]; then
echo "StorySave.apk does not exist."
echo "Download latest StorySave apk from APK Mirror and then rename it to StorySave.apk"
echo "https://www.apkmirror.com/apk/liam-cottle/storysave/storysave-1-26-2-release/storysave-1-26-2-android-apk-download/"
@liamcottle
liamcottle / script.txt
Created December 29, 2021 14:15
Retrieve the public IP address of a specific Mikrotik RouterBoard interface.
:global getPublicIP do={
# tag for temporary configurations
:local tag "get-public-ip-via-$interface"
# service that provides public ip address in http response
:local lookupProtocol "https"
:local lookupHostname "api.ipify.org"
# add temporary address list for lookup service