Skip to content

Instantly share code, notes, and snippets.

@dwhacks
dwhacks / speed.txt
Created January 27, 2014 07:07
speed equation tetris
For speed I used the formula:
delay = 725 * .85 ^ level + level
Where delay is the time (in milliseconds) before the block falls one row -- That equation reaches its minimum at level 30 (35.5 ms delay) and begins to climb again until delay = level (basicly the game slows down about 6ms per drop by level 41). However, I was modeling a certain behavior, and you might have better performance with a more general equation:
delay = delay_at_level_0 / (level + 1)
Where delay_at_level_0 is a constant
@dwhacks
dwhacks / tetris_speed_tester.ino
Last active January 4, 2016 17:59
Tetris drop speed versus level calculator test platform TO THE XTREME By D-Whacks2000
/*Tetris drop speed versus level calculator test platform TO THE XTREME
By D-Whacks2000
*/
int level = 0;
int dropSpeed = 1000;
@dwhacks
dwhacks / ATtiny13a_Erick.ino
Created April 14, 2014 02:00
Blinking bike light.
/*
*Bike LED
*by DWHacks, using Watchdog sleep timer and Button State Change
*Coded for Attiny13a at 4.8mhz
*check out daynewaterlow.com for more projects and hacks
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
@dwhacks
dwhacks / CPdelete.txt
Last active August 29, 2015 14:00
Couch Potato Deleting
04-19 11:54:43 INFO [hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?y=2013&t=pacific+rim, data: []
04-19 11:54:43 INFO [hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/search/Pacific+Rim+2013/?limit=1, data: []
04-19 11:54:44 INFO [re.providers.info.omdbapi] Found: Pacific Rim (2013)
04-19 11:54:44 INFO [tato.core.plugins.scanner] Found 1 movies in the folder /media/movies/Pacific Rim (2013)
04-19 11:55:38 INFO [tato.core.plugins.renamer] Download of Pacific Rim 2013 BluRay 720p DTS x264-MgB completed!
04-19 12:42:48 INFO [otato.core.plugins.manage] Updating manage library: /media/movies04-19 12:42:48 INFO [hpotato.core.plugins.base] Opening url: get https://api.couchpota.to/search/Pacific+Rim+2013/?limit=1, data: []
04-19 12:42:48 INFO [hpotato.core.plugins.base] Opening url: get http://www.omdbapi.com/?y=2013&t=pacific+rim, data: []
04-19 12:42:48 INFO [re.providers.info.omdbapi] Found: Pacific Rim (2013)
04-19 12:42:49 INFO [tato.core.plugins.scanner] Found 1 movie
@dwhacks
dwhacks / Attiny_gps_beacon.ino
Created May 4, 2014 18:54
Attiny softserial and gps
/*
Original code come from Adafruit GPS logger shield kit - v1.1
http://www.adafruit.com/products/98
http://www.ladyada.net/make/gpsshield/download.html
All of this example Arduino code is Public Domain. Enjoy!
http://en.wikipedia.org/wiki/GNU_General_Public_License
Modified by DWHacks for use with U-blox PCI-5S.
Info about U-blox PCI-5S here: http://emerythacks.blogspot.ca/2013/01/u-blox-pci-5s-cheap-gps-module-for-your.html
@dwhacks
dwhacks / arduino_table.ino
Created May 8, 2014 02:22
some arduino morse, correct table
//
//Arduino Nano Beacon ver 1.0
// Written by Michele Casali Iz3klb
// Email: iz3klb@yahoo.it
//
// This code is so trivial that I'm releasing it completely without
// restrictions. If you find it useful, it would be nice if you dropped
// me an email. Feel free to use whatever.
//
@dwhacks
dwhacks / Morse.cpp
Created May 8, 2014 03:44
Arduino Morse Library file
//
// Arduino Morse Library
//
// Put this file with Morse.h inside a folder "Morse" in your "libraries" folder within your sketchbook folder.
// /your_sketch_folder/libraries/Morse
// Then restart the arduino software.
//
// Origonally written by Erik Linder SM0RVV and Mark VandeWettering K6HX
// Contact: sm0rvv at google mail
// Updated by Dayne Waterlow DWHACKS to fix a few table errors
@dwhacks
dwhacks / Morse.h
Created May 8, 2014 03:48
Arduino Morse library .h file
//
// Arduino Morse Library
// Written by Erik Linder SM0RVV and Mark VandeWettering K6HX
//
// Put this file with Morse.cpp inside a folder "Morse" in your "libraries" folder within your sketchbook folder.
// /your_sketch_folder/libraries/Morse
// Then restart the arduino software.
//
// Released 2011 under GPLv3
//
@dwhacks
dwhacks / attiny13_beacon.ino
Created June 10, 2014 01:40
attiny_13 beacon
// attiny13_beacon.ino
#include <Morse.h>
Morse morse(4, 10, 1); //set up the Morse Pin, Speed, type
void setup() {
}
@dwhacks
dwhacks / Attiny85_LCD_Serial.ino
Created June 11, 2014 01:51
Attiny85 read serial LCD
/*
SoftSerial Enabled LCD Kit
by: Jim Lindblom - SparkFun Electronics
Characters received in a Softserial stream are displayed on a 16x2,
20x4, etc. LCD. Special commands are also available to clear, scroll
display cursors and other functions.
License: Beerware - As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day,
and you think this stuff is worth it, you can buy
me a beer in return.