Skip to content

Instantly share code, notes, and snippets.

@dwhacks
dwhacks / Attiny85_batteryMonitor.ino
Last active Sep 3, 2020
Attiny battery monitor with tiny core.
View Attiny85_batteryMonitor.ino
/*
Attiny85_batteryMonitor
Ideas borrowed from: https://github.com/unixbigot/Flat-Mate
modified for arduino tiny core by DWhacks
*@@ Voltage trigger levels.
*
View Attiny85_watchdog_example.ino
/*
* Watchdog Sleep Example
* Demonstrate the Watchdog and Sleep Functions
* LED on digital pin 0
*
* KHM 2008 / Lab3/ Martin Nawrath nawrath@khm.de
* Kunsthochschule fuer Medien Koeln
* Academy of Media Arts Cologne
*
* Modified on 5 Feb 2011 by InsideGadgets (www.insidegadgets.com)
View Test_LPF.ino
//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:
View Test_LPF.ino
//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:
View gist:7a2d1ab474b5f6415479f73154b12f90
sudo su
sudo echo "/usr/sbin/mysqld { }" > /etc/apparmor.d/usr.sbin.mysqld
apparmor_parser -v -R /etc/apparmor.d/usr.sbin.mysqld
@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
View esp8266_thingspeak_bmp280.ino
/**********************************************
* 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>
@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
View testgps.php
<!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>
@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;
You can’t perform that action at this time.