Skip to content

Instantly share code, notes, and snippets.

@dwhacks
dwhacks / arduino_table.ino
Created May 8, 2014
some arduino morse, correct table
View arduino_table.ino
//
//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 / Attiny_gps_beacon.ino
Created May 4, 2014
Attiny softserial and gps
View Attiny_gps_beacon.ino
/*
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 / CPdelete.txt
Last active Aug 29, 2015
Couch Potato Deleting
View CPdelete.txt
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 / ATtiny13a_Erick.ino
Created Apr 14, 2014
Blinking bike light.
View ATtiny13a_Erick.ino
/*
*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 / tetris_speed_tester.ino
Last active Jan 4, 2016
Tetris drop speed versus level calculator test platform TO THE XTREME By D-Whacks2000
View tetris_speed_tester.ino
/*Tetris drop speed versus level calculator test platform TO THE XTREME
By D-Whacks2000
*/
int level = 0;
int dropSpeed = 1000;
@dwhacks
dwhacks / speed.txt
Created Jan 27, 2014
speed equation tetris
View speed.txt
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 / BlocDrop_v01.ino
Last active Jan 4, 2016
Progress on gamby blocdrop
View BlocDrop_v01.ino
/*
BLOC DROP: A strangely familiar falling block game
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
by David Randall Stokes (gamby@logicalzero.com) 9/05/2012
THIS IS STILL A WORK-IN-PROGRESS. The game is playable, but
the scoring doesn't work correctly.
*/
View BlocDrop.ino
/*
BLOC DROP: A strangely familiar falling block game
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
by David Randall Stokes (gamby@logicalzero.com) 9/05/2012
THIS IS STILL A WORK-IN-PROGRESS. The game is playable, but
the scoring doesn't work correctly.
*/
View BlocDrop.ino
/*
BLOC DROP: A strangely familiar falling block game
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
by David Randall Stokes (gamby@logicalzero.com) 9/05/2012
THIS IS STILL A WORK-IN-PROGRESS. The game is playable, but
the scoring doesn't work correctly.
*/
View rgd_hacks.ino
int redPin = 1;
int greenPin = 4;
int bluePin = 0;
void setup()
{
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
You can’t perform that action at this time.