Skip to content

Instantly share code, notes, and snippets.

@clydebarrow
clydebarrow / .gitignore
Last active April 7, 2024 20:37
ESPHome LVGL samples
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml
/wifi.yaml
@clydebarrow
clydebarrow / .gitignore
Last active April 15, 2024 22:28
LVGL watch face in ESPHome yaml
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml
/wifi.yaml
@flaviut
flaviut / Setting up Emporia Vue 2 with ESPHome.md
Last active March 12, 2024 00:27
Setting up Emporia Vue 2 with ESPHome
@Bouni
Bouni / LinuxCNC-Ethercat.md
Last active April 21, 2024 02:09
Linux CNC + EtherCat + RPi 4 Setup

The folowing is a writup from Hakans forum post!

RPi Setup

  1. Download & Write image to SD card: www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
  2. Configure Wifi via wpa_supplicant.conf
  3. Put SD card into RPi and verify that RT-PREEMT Kernel is running: uname -a
  4. Update everything and reboot: sudo apt update && sudo apt upgrade && sudo reboot
@codeniko
codeniko / UNMS-Unifi-Pi-Buster.md
Last active June 22, 2023 02:23
Setup UNMS and Unifi network controller on Raspberry pi 4 Raspbian buster

Setup Raspbian Buster

I'm using debian 10 as my daily so these are *nix commands. Mac should work with these too but you're on your own if you're using Windows. Goal for me is to make a headless raspberry pi I can SSH into and connect to my network using Ethernet. You should be comfortable in command line if you choose to follow this guide.

  1. Go to https://www.raspberrypi.org/downloads/raspbian and download Raspbian lite archive
  2. unzip the image
  3. Plug in sdcard. Run lsblk to see drives and mount points. Likely, the sdcard will show up in /dev/sda or /dev/sdb and may have some partitions like /dev/sda1 and /dev/sda2.
  4. If partitions are mounted, unmount all of them. Ex: umount /dev/sda1 and umount /dev/sda2
  5. Copy the raspbian image to the sdcard with sudo dd if=RASPBIAN_IMAGE_FILE.img of=/dev/sda bs=4M
  6. Run sync to ensure the written contents are flushed
  7. OPTIONAL: To start ssh server on boot, Unplug sdcard and reinsert to remount new partitions. You'll have two with raspbian.
@lackofdream
lackofdream / pmspi.py
Last active July 10, 2018 06:51
Raspberry Pi and PMS5003
import serial
import datetime
from pymongo import MongoClient
port = serial.Serial('/dev/ttyAMA0', baudrate=9600, timeout=2.0)
client = MongoClient('172.31.150.230')
def read_pm_line(_port):
rv = b''