Skip to content

Instantly share code, notes, and snippets.

@paulbarber
paulbarber / Makefile
Created April 9, 2015 17:00
makefile for blinky.c for atTiny85
MCU=attiny85
AVRDUDEMCU=t85
CC=/usr/bin/avr-gcc
CFLAGS=-g -Os -Wall -mcall-prologues -mmcu=$(MCU)
OBJ2HEX=/usr/bin/avr-objcopy
AVRDUDE=/usr/local/bin/avrdude
TARGET=blinky
all :
$(CC) $(CFLAGS) $(TARGET).c -o $(TARGET)
$(OBJ2HEX) -R .eeprom -O ihex $(TARGET) $(TARGET).hex
@paulbarber
paulbarber / moody.c
Last active August 29, 2015 14:16
A full colour fading mood light based on the ATtiny85
/* moody.c ATtiny85_3pinPWM
P Barber
Jan 2014
Version 1.0
based on http://matt16060936.blogspot.co.uk/2012/04/attiny-pwm.html
Code for a mood light based on the ATtiny85
It uses 3 PWM outputs for smooth transitions between a theoretical 16 million colours!
@paulbarber
paulbarber / ChristmasCountdown.py
Last active February 10, 2018 09:10
Christmas Countdown in Python and Tkinter
# tk.overrideredirect(1) causes full screen behaviour
# If run from the command line you can exit with Ctrl-c or Alt-F4 to close window
import time
import random
from datetime import datetime
from tkinter import *
tk = Tk()
@paulbarber
paulbarber / Command Line Pipeline
Last active November 23, 2021 14:16
Test of GStreamer saving to file from C code
gst-launch-1.0 videotestsrc num-buffers=100 ! tee name=t ! queue ! videoconvert ! xvimagesink sync=false t. ! queue ! videorate ! video/x-raw,framerate=25/1 ! videoconvert ! avenc_mpeg2video bitrate=3000000 ! avimux ! filesink location=test_file.avi async=0