Skip to content

Instantly share code, notes, and snippets.

## Server section with all kinds of settings for the LCDd server ##
[server]
DriverPath=/usr/local/lib/lcdproc/
Driver=hd44780
Bind=127.0.0.1
Port=13666
User=pi
#Foreground=yes
# Hello message: each entry represents a display line; default: builtin
@dglaude
dglaude / LCD20.txt
Created July 23, 2016 20:59
LCD20 with lcdproc
### Setup of the i2c bus and tools ###
# Enable i2c bus with the menu of raspi-config
sudo raspi-config
# Reboot (this might not be necessary)
sudo shutdown -r now
# make sure Raspbian is up to date
#!/bin/bash
# ClusterHAT controller
if [ $# -gt 0 ];then
MODE=$1
else
echo
echo "Usage:"
echo " $0 <action> [<device>] [<device>]"
echo " action = on / off"
@dglaude
dglaude / REPL upload
Last active September 13, 2016 23:24
Blinkt! on ESP8266 microPython
f=open('colorsys.py','w')
f.write('''
''')
f.close()
@dglaude
dglaude / install_cat_and_copy.py
Last active October 9, 2016 18:53
microPython tools: cat, copy & decat (a debug cat with line number)
import os
os.mkdir("lib")
os.chdir("lib")
f=open("decat.py","w")
f.write('''
import os
def decat(filename):
f=open("mote.py","w")
f.write('''
from machine import Pin
from apa102 import APA102
import colorsys
import time
def main():
clock = Pin(14, Pin.OUT)
data = Pin(13, Pin.OUT)
@dglaude
dglaude / PokemonGo automation
Created March 22, 2017 00:25
ESP8266+Micropython+LDR+Servo=PokemonGo Plus Automation
f=open('main.py','w')
f.write('''import pokemon
pokemon.main()''')
f.close()
f=open('pokemon.py','w')
f.write('''import machine, time
p12 = machine.Pin(12)
adc = machine.ADC(0)
@dglaude
dglaude / README.md
Last active April 1, 2017 19:07
Inspiring LED and other APA on [Pocket]CHIP
@dglaude
dglaude / BlueDotBlinktColorPicker.py
Last active June 2, 2017 22:49
HSV color control of the Blinkt! from a Blue Dot.
#!/usr/bin/env python
from bluedot import BlueDot
import colorsys
import time
import blinkt
def move(pos):
# print("The Blue Dot x={} y={} d={} a={}".format(pos.x, pos.y, pos.distance, pos.angle))
h=((pos.angle+180) % 360) / 360
@dglaude
dglaude / irrgbcontrol.py
Created June 24, 2017 13:14
Source code for my test of IRLibCP. This control an RGB strip in infrared.
# IRLibCP by Chris Young. See copyright.txt and license.txt
# Sample program for sending one value of NEC protocol.
# See https://github.com/cyborg5/IRLibCP
#
# Adapted by David Glaude to send a command from a list in sequence at each press of A.
# I use this to control an RGB strip from Circuit Playground Express.
import digitalio
import time
import board
import IRLib_P01_NECs