Skip to content

Instantly share code, notes, and snippets.

View ahalekelly's full-sized avatar

ahalekelly ahalekelly

View GitHub Profile
@ahalekelly
ahalekelly / LEDStrips.ino
Last active August 29, 2015 14:15
Buggy LED Strips
#include "FastLED.h"
#include <MemoryFree.h>
const byte ledsPin = 3;
const byte sensorPin = A1;
const int numLeds = 300;
const int ledTime = 1000;
const int sensorMin = 0;
@ahalekelly
ahalekelly / FlashSimonk.bat
Last active January 7, 2017 20:23
Windows Simonk Complile and Flash Script
set board = bs
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\avrasm2.exe" -fI -o %board%.hex -e %board%.eeprom tgy.asm
avrdude -c stk500v2 -b 9600 -P COM4 -u -p m8 -U flash:w:%board%.hex:i
pause
global:
u32TimeCounter
stepper object properties:
u8PulsePinState
u8DirPinState
u8WriteDir
u32LastStepTime
u32NextStepTime
f32StepDistance_um
#include <stdlib.h>
#include <cmath>
#include <stdio.h>
#include <algorithm>
using namespace std;
#define Lint8 char
#define Luint8 unsigned char
#define Lint16 short int
#define Luint16 unsigned short int
@ahalekelly
ahalekelly / gist:1795498b2457367fff279122ba8b04ef
Created August 15, 2018 07:01
Nerf select fire pseudocode
const uint16_t pusherTimeout = 300; // ms
const uint16_t pusherDebounceTime = 50; // ms
const uint8_t pusherMotorPin;
const uint8_t ccSwitchPin;
uint32_t time = 0;
uint32_t pusherTimeOn = 0;
uint32_t pusherTimeOff = 0;