This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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! | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Experimental Probability Dice Simulator | |
This program serves to demonstrate how experimental probability gives | |
way to theoretical probability as the number of trials increases, using rolls | |
of a perfect, standard, cube-shaped die. In effect, it demonstrates that the | |
probability of rolling any number on a perfect die is: | |
lim x = 1/6 = 0.1666... | |
x -> infty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This sketch demonstrates how to interface with ultrasonic sensors using the Arduino and NewPing library | |
#include <NewPing.h> | |
int TRIGGER = 12; | |
int ECHO = 11; | |
//Declare a sonar object specifying the trigger and echo pins | |
NewPing sonar(TRIGGER, ECHO); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
j = 0 | |
pi = 0 | |
plusminus = True | |
start_time = time.time() | |
while True: | |
if j%2 == 1: | |
if plusminus == True: | |
pi += (1/j) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Using an Arduino with a Power Relay | |
Parts used: | |
--ultrasonic sensor | |
--desk lamp | |
--Arduino Uno | |
--120v relay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 | |
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 | |
functions from there, for example enter the following in a terminal: |
OlderNewer