Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bigjosh
bigjosh / Stylefile.yml
Created July 31, 2018 17:05
Customizations for github.com via StyleURL.
---
version: 1.0
domains:
- github.com
url_patterns:
- github.com/*
timestamp: '2018-07-31T17:04:46Z'
id: rSgh
redirect_url: https://github.com/bigjosh/TSL/issues/36#issuecomment-406783608
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome
REM ***This batch file will automatically run SCANPST on every PST file in the
REM ***directory specified by PST_FILE_MASK.
set SCANPST_PATH="C:\Program Files (x86)\Microsoft Office\root\Office16\SCANPST.EXE"
set PST_FILE_MASK="D:\Users\josh\Documents\My Mail\*.pst"
REM *** CD into in the directory that contains the launched batch file...
echo CDing into "%~dp0"
pushd "%~dp0"
// This Arduino sketch drives a coil to make a Lucky Cat wave
// The coil should be connected directly to pins A0 and ground
// It uses the voltage generated by the magnet passing the coil to time its pulses
// More info at...
// http://wp.josh.com/2018/05/07/deconstructing-kitty
#define LED_PIN 13 // Show a flash on this pin everytime we pulse the coil
@bigjosh
bigjosh / softdown.c
Last active April 27, 2018 16:39
Turn off Beagle Bone am355x using the RTC TIMER2
#define RTC_SS_BASE 0x44e3e000L
#define SECONDS_REG 0x00
#define MINUTES_REG 0x04
#define HOURS_REG 0x08
#define DAYS_REG 0x0C
#define MONTHS_REG 0x10
#define YEARS_REG 0x14
#define ALARM_SECONDS_REG 0x20
/*
* Take on the color of the dominant Blink attached
*/
byte myState = 0;
Color colors[] = { BLUE, RED, YELLOW, ORANGE, GREEN};
const byte myState_count = COUNT_OF (colors);
bool errorFlag[ FACE_COUNT ];
/*
* Speed up the rotation of LEDs lights or slow down based on button press
*/
#include "blinklib.h"
#include "blinkstate.h"
#include "Serial.h"
ServicePortSerial Serial;
@bigjosh
bigjosh / RingAnimationDebug.ino
Last active December 1, 2017 16:45 — forked from jbobrow/RingAnimationDebug.ino
Looking to have a circular fade rotating at a specific speed of degrees per second.
/*
* Speed up the rotation of LEDs lights or slow down based on button press
*/
#include "blinklib.h"
#include "Serial.h"
ServicePortSerial Serial;
#define MS_PER_S (1000)
if (car->location!=car->home && car->state != returned ) {
sendExtentionTickleText( zipCarMemeber->number[mobile] );
}
@bigjosh
bigjosh / prototypebuilderout.cpp
Created November 12, 2017 20:19
Output of the Arduino builder for a program that has multiple typedefs
#include <Arduino.h>
#line 1 "C:\\Users\\passp\\Documents\\Arduino\\sketch_nov10a\\sketch_nov10a.ino"
#line 1 "C:\\Users\\passp\\Documents\\Arduino\\sketch_nov10a\\sketch_nov10a.ino"
typedef struct {
int x1;
} x;
x *a;
#line 7 "C:\\Users\\passp\\Documents\\Arduino\\sketch_nov10a\\sketch_nov10a.ino"
/*
* Color By Number/Neigbor
*
* An example showing how to use the blinkstate library.
*
* Each Blink broadcasts 1 to its neighbors, letting its neigbors know it's present.
* Each Blink displays a color based on the number of neighbors around it.
*
*/