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
/* | |
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. | |
*/ |
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
/*Tetris drop speed versus level calculator test platform TO THE XTREME | |
By D-Whacks2000 | |
*/ | |
int level = 0; | |
int dropSpeed = 1000; | |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<?php if(!session_id()) session_start(); ?> | |
<html> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<head> | |
<title>GPS Tracker</title> | |
</head> | |
<body> |
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
/********************************************** | |
* Catalin Batrinu bcatalin@gmail.com | |
* Read temperature and pressure from BMP280 | |
* and send it to thingspeaks.com | |
**********************************************/ | |
#include <Wire.h> | |
#include <SPI.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_BMP280.h> |
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
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 |
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
sudo su | |
sudo echo "/usr/sbin/mysqld { }" > /etc/apparmor.d/usr.sbin.mysqld | |
apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld |
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
//BCD to Decimal Test sketch by VE7DNT | |
const int A = 4; //pin numbers | |
const int B = 5; | |
const int C = 6; | |
const int D = 7; | |
void setup() { | |
// put your setup code here, to run once: |
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
//BCD to Decimal Test sketch by VE7DNT | |
const int A = 4; //pin numbers | |
const int B = 5; | |
const int C = 6; | |
const int D = 7; | |
void setup() { | |
// put your setup code here, to run once: |
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
/* | |
Attiny85_batteryMonitor | |
Ideas borrowed from: https://github.com/unixbigot/Flat-Mate | |
modified for arduino tiny core by DWhacks | |
Added control of RGB LED strip or possibly just an RGB LED for use as a rear Bicycle light | |
*@@ Voltage trigger levels. | |
* |
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
#include <Manchester.h> | |
/* | |
You've Got Snail Mail by dwhacks: http://daynewaterlow.com | |
Using Arduino-Tiny core on the Attiny85 | |
http://code.google.com/p/arduino-tiny/ | |
Notifier Code borrowed from: https://github.com/LowPowerLab/MailboxNotifier | |
Manchester library for Arduino from: http://mchr3k.github.io/arduino-libs-manchester/ |