Skip to content

Instantly share code, notes, and snippets.

@electronut
electronut / Makefile
Created June 12, 2013 09:17
A Makefile for ATtiny84 AVR programming.
# Name: Makefile
#
# A Makefile for the ATtiny84.
#
# electronut.in
DEVICE = attiny84
CLOCK = 8000000
PROGRAMMER = -c usbtiny
OBJECTS = main.o
@electronut
electronut / testGPIO.py
Created June 18, 2013 06:48
blinking an LED with Raspberry Pi. LED is connected on pin 18 (GPIO5)
# blinking an LED with Raspberry Pi. LED is connected on pin 18 (GPIO5)
#
# run this as:
# sudo python test.py
#
# electronut.in
import time
import RPi.GPIO as GPIO
@electronut
electronut / conway.py
Last active June 20, 2023 17:48
A simple Python matplotlib implementation of Conway's Game of Life.
################################################################################
# conway.py
#
# Author: electronut.in
#
# Description:
#
# A simple Python/matplotlib implementation of Conway's Game of Life.
################################################################################
@electronut
electronut / rpi-cat9532.py
Created June 29, 2013 11:04
Raspberry Pi communicating with I2C PWM chip CAT9532 (16-bit Programmable LED Dimmer)
###############################################################################
# rpi-cat9532.py
#
# Author: electronut.in
#
# Description:
#
# Raspberry Pi communicating with I2C PWM chip CAT9532
# (16-bit Programmable LED Dimmer)
#
@electronut
electronut / speech-test.py
Last active December 19, 2015 09:29
Testing Raspberry Pi audio using pyttsx - Python Cross-platform text-to-speech wrapper.
###############################################################################
# speech-test.py
#
# Author: electronut.in
#
# Description:
#
# Testing Raspberry Pi audio using pyttsx - Python Cross-platform
# text-to-speech wrapper
#
@electronut
electronut / bkup-pi.sh
Created July 6, 2013 02:52
backup script for Raspberry Pi - tested on OS X
# backup script for Raspberry Pi
#
# electronut.in
#
#!/bin/bash
echo Backing up RPi \#1...
# set this to Raspberry Pi IP address
PI_ADDR="192.168.4.31"
@electronut
electronut / ledctrl.py
Created March 22, 2014 11:17
A simple example for communicating with a Raspberry Pi from you phone's browser. Uses the Bottle Python web framework, and jQuery AJAX.
"""
ledctrl.py
A simple example for communicating with a Raspberry Pi from you phone's
browser. Uses the Bottle Python web framework, and jQuery AJAX.
Author: Mahesh Venkitachalam / electronut.in
"""
@electronut
electronut / dagu_ultrasonic
Created March 29, 2014 07:39
Simple test of ultrasonic sensor HC-SR04 connected to a Dagu mini driver (arduino compatible board) and a two-wheel Dagu chassis.
//----------------------------------------------------------
// dagu_ultrasonic.ino
//
// Simple test of ultrasonic sensor HC-SR04 connected to
// Dagu mini driver (arduino compatible board) and a two
// wheel Dagu chassis.
//
// Author: Mahesh Venkitachalam
// Website: electronut.in
//----------------------------------------------------------
@electronut
electronut / ardu_alert.py
Created April 24, 2014 15:36
Alert Arduino via serial port when an event happens on the host computer.
"""
ardu_alert.py
Alert Arduino via serial port when an event happens on the host computer.
Author: Mahesh Venkitachalam
Website: electronut.in
"""
@electronut
electronut / ardu_alert.ino
Created April 24, 2014 15:42
read serial port and turn leds on/off
// ardu_alert.ino
//
// read serial port and turn leds on/off
//
// Mahesh Venkitachalam
// electronut.in
#include "Arduino.h"