Skip to content

Instantly share code, notes, and snippets.

'''
PROTOTYPE SOFTWARE -- Drum Kit with Raspberry Pi
Amanda @ electrothoughts.wordpress.com 2015
Please reuse this code to your heart's content!
Notes:
- Uses pygame.mixer module to play audio files
- Uses indexing for all functions with drums and LEDs
- Some extraneous functions, such as the extra colors in pinColor
- This will run headless, so eventually the KeyboardInterrupt will be removed
@mandyRae
mandyRae / iopi.py
Last active December 1, 2015 14:11
This is a super simple Python module that's used for quicker access to the GPIO pins on the Raspberry Pi, mainly for use in interactive mode.
"""
iopi module ... Input/Output Pi Version 0.0
For instructions on how to install this module on
Raspberry Pi, visit https://electrothoughts.wordpress.com/2015/06/23/the-python-raspi-gpio-module-remade-iopi-py/
This is a module to simplify use of GPIO pins,
including faster setup and control
especially within interpreter/IDLE
"""
@mandyRae
mandyRae / complex_quadratic_formula_calculator.py
Created November 18, 2015 13:32
This Python 3 program uses the quadratic formula to solve a quadratic equation. The user enters values for a, b, and c.
'''
Quadratic Equation Calculator
*Displays the equation
*Computes two real and complex solutions to standard quadratic equations
*Provides clean output
Amanda @ Electrothoughts.wordpress.com Oct 2015
Please reuse this code to your heart's content!
'''
@mandyRae
mandyRae / oscillating_air-conditioning_fan_arduino.ino
Last active January 18, 2016 00:26
This is software for an Arduino-controlled oscillating air-conditioning fan. A fan, two potentiometers, and a servo are wired up to the Arduino. The fan is mounted to the servo, and can move in a 90 degree sweep. One pot adjusts the fan's speed, and the other adjusts the oscillation speed.
/*
Oscillating Fan with Arduino Uno -- Software
Find build instructions at www.electrothoughts.wordpress.com/2015/05/31/oscillating-fan-with-arduino-part-2/
Also see "Part 1" of this project for initial ideas at www.electrothoughts.wordpress.com/2015/05/21/oscillating-fan-with-arduino-part-1/
Amanda on Electrothoughts - 2015
Reuse this code to your heart's desire!
Components Required:
-5v micro-servo
'''
Five-Button Melody Recorder with Raspberry Pi
2015 Amanda on wordpress.electrothoughts.com
Please reuse this code to your heart's content!
This circuit records a melody using buttons and plays the melody
back through a buzzer or 8 ohm speaker. Inspired by the game 'Music Machine'
on old electronic Merlin toy.
Components:
'''
Large Seven-Segment Display
Python Code for controlling display with a Raspberry Pi's GPIO
Written by Amanda on electrothoughts.wordpress.com, Aug 25, 2015
For the original project visit https://electrothoughts.wordpress.com/2015/09/11/project-xl-seven-segment-display/
Please feel free to modify this code to your heart's content!
This code contains function definitions. To make your display work,
it's recommended that you run the code in the Python shell IDE as root, and execute