Skip to content

Instantly share code, notes, and snippets.

@dwhacks
dwhacks / DEBUG=9
Created September 7, 2013 17:40
debug=9
PHYS: transact 10000111
PHYS: flush 21 13 1c 00 00 00 30 80 10 87 07 07 07
PHYS: expecting 13 = 10 ack + 3 data bytes
PHYS: skipping 10 acks: 01 01 01 01 01 01 01 01 01 01
PHYS: read: 00 01 00
PHYS: read ack: 2
SWD: SWD WAIT, retrying
SWD: SWD transaction ap in 0, try 2
PHYS: transact 10000111
PHYS: turning out
@dwhacks
dwhacks / teensy_loggerUBLOX
Last active December 4, 2020 05:12
Ublox cheap GPS logger
/*
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
Info about DWHacks: dwhacks.blogspot.com
@dwhacks
dwhacks / gist:6484481
Last active December 22, 2015 14:18
GPS data
#~$GPRMC,031106.250,A,4528.8808,N,07334.0089,W,0.10,,120913,,,A*68
#$GPVTG,,T,,M,0.10,N,0.2,K,A*10
#~$GPGGA,031106.500,4528.8808,N,07334.0090,W,1,07,1.4,32.7,M,-32.6,M,,0000*59
#!$GPGSV,2,1,08,15,65,055,36,18,63,301,32,19,05,332,24,21,65,231,30*75
#!$GPGLL,4528.8808,N,07334.0090,W,031106.500,A,A*42
#~$GPVTG,,T,,M,0.10,N,0.2,K,A*10
#~$GPGSA,A,3,19,18,26,21,22,24,15,,,,,,2.5,1.4,2.0*36
#~$GPGSV,2,2,08,22,27,290,31,24,46,143,28,26,19,053,31,30,13,053,30*79
#~$GPRMC,031107.000,A,4528.8808,N,07334.0090,W,0.04,,120913,,,A*63
#$GPVTG,,T,,M,0.04,N,0.1,K,A*16
/*
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
Info about DWHacks: dwhacks.blogspot.com
@dwhacks
dwhacks / gpsdw
Last active December 22, 2015 16:29
#include <TinyGPS.h>
#include <SD.h>
/* This sample code demonstrates the normal use of a TinyGPS object. */
TinyGPS gps;
/* On Teensy, the UART (real serial port) is always best to use. */
/* Unlike Arduino, there's no need to use NewSoftSerial because */
/* the "Serial" object uses the USB port, leaving the UART free. */
/*not working*/
#include <TinyGPS.h>
#include <SD.h>
/* This sample code demonstrates the normal use of a TinyGPS object. */
TinyGPS gps;
/* On Teensy, the UART (real serial port) is always best to use. */
@dwhacks
dwhacks / TeenLogger_DW_ublox_uart.ino
Last active December 4, 2020 05:13
GPS dwhacks cheap ublox
/*
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
Info about DWHacks: dwhacks.blogspot.com
@dwhacks
dwhacks / FSM_dw_gps_1.ino
Created September 13, 2013 02:43
DW finite state machine GPS logger
/*GPS logger for Ublox GPS module outputting NMEA data through Uart
by DWhacks
For Teensy
Help from Feyr and tgmobile on ##foulab IRC
using finite state machine http://playground.arduino.cc/code/FiniteStateMachine
*/
@dwhacks
dwhacks / ATtiny13a_LEDfirefly_4_8MHz.ino
Created September 13, 2013 12:22
4Mhz_LED_Firefly.ino
/*
* LED Firefly by http://dwhacks.blogspot.ca/ using attiny 13a @4.8MHz
* inspired by http://www.seanet.com/~karllunt/fireflyLED.html
* using core13 for Arduino http://sourceforge.net/projects/ard-core13/
*/
#include <avr/sleep.h>
#include <avr/wdt.h>
#ifndef cbi
@dwhacks
dwhacks / Attiny85_batteryMonitor.ino
Last active April 20, 2022 16:41
Attiny battery monitor with tiny core.
/*
Attiny85_batteryMonitor
Ideas borrowed from: https://github.com/unixbigot/Flat-Mate
modified for arduino tiny core by DWhacks
*@@ Voltage trigger levels.
*