Skip to content

Instantly share code, notes, and snippets.

Mike Almond mikedotalmond

Block or report user

Report or block mikedotalmond

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mikedotalmond
mikedotalmond / lamp-leds.ino
Created Apr 11, 2016
Randomly turn pixels on/off on 3 8x8 LED displays
View lamp-leds.ino
/**
* Randomly turn pixels on/off on 3 8x8 LED displays
* @author Mike Almond - @mikedotalmond | github.com/mikedotalmond
*/
#include "LedControl.h"
const int LED_DATA = 2;
const int LED_LOAD = 3; // CS
const int LED_CLK = 4;
View pir-audio.ino
/*
*/
#include <WaveHC.h>
#include <WaveUtil.h>
const int minimumSoundInterval = 2000;
const int soundIntervalRange = 8000;
boolean playingSound = false;
int lastPlayed = 0;
@mikedotalmond
mikedotalmond / SharedMemory.hx
Created Nov 5, 2015
SharedMemory - Use with the Haxe flash.Memory API for fast (shared) ByteArray access.
View SharedMemory.hx
package;
import flash.Memory;
import flash.utils.ByteArray;
import flash.utils.Endian;
import flash.Vector;
/**
* ...
* @author Mike Almond - https://github.com/mikedotalmond
View Lorenz.hx
package;
/**
* ...
* @author Mike Almond - https://github.com/mikedotalmond
*/
class Lorenz {
public var sigma:Float;
public var rho:Float;
View keybase.md

Keybase proof

I hereby claim:

  • I am mikedotalmond on github.
  • I am mikealmond (https://keybase.io/mikealmond) on keybase.
  • I have a public key whose fingerprint is 5739 026D 5DBB B018 114E DF65 DE3F CC0C 4EE8 88D5

To claim this, I am signing this object:

@mikedotalmond
mikedotalmond / StarlingSpriteSheet.hx
Created Nov 22, 2013
StarlingSpriteSheet / SubImageSprite for Flambe
View StarlingSpriteSheet.hx
class StarlingSpriteSheet {
public static function parse(atlasXml:Xml, texture:Texture):Map<String,SubImageSprite> {
var spritesMap = new Map<String, SubImageSprite>();
for (el in atlasXml.elements()) {
if (el.nodeName == 'TextureAtlas') {
var textures = el.elementsNamed('SubTexture');
@mikedotalmond
mikedotalmond / HC_SR04_UltrasoundDistanceSensor.ino
Last active Jul 6, 2017
Example sketch for working with the HC-SR04 Ultrasound distance sensor. Uses https://github.com/mikedotalmond/arduino-pulseInWithoutDelay
View HC_SR04_UltrasoundDistanceSensor.ino
/**
* @author Mike Almond - @mikedotalmond
*
* Example sketch for working with the HC-SR04 Ultrasound distance sensor
* http://users.ece.utexas.edu/~valvano/Datasheets/HCSR04b.pdf
*
* Uses a hardware interrupt to monitor the echo pin and measure the pulse length (without pausing code execution like you would when using Arduino::pulseIn())
* https://github.com/mikedotalmond/arduino-pulseInWithoutDelay
* PulseInZero uses interrupt 0 ( pin 2 on arduino uno)
* PulseInOne uses interrupt 1 ( pin 3 on an arduino uno)
You can’t perform that action at this time.