Skip to content

Instantly share code, notes, and snippets.

ajfisher ajfisher

Block or report user

Report or block ajfisher

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
ajfisher / gist:1061793
Created Jul 2, 2011
Make an RGB LED show different colours based on range finder distance
View gist:1061793
Use a ping sensor to determine distance and then depending on the distance,
show warmer or cooler colours.
Built using a ping))) Sensor and connected to a RGB display.
Uses the ping))) example in the base Arduino install, written by David Mellis & Tom Igoe
ajfisher /
Created Oct 16, 2011
Twitter Stream Analyser and Network Activator - watches twitter stream for keywords and hits a URL when it finds one.
# Twitter stream analyser and network activator (TSANA)
# This script analyses a twitter stream for keywords using the twitter
# streaming api - off the back of it, it then hits a user defined url
# In my case this is being used to tell an Arduino to pulse a light but
# could be used for anything arbitrary.
# Author: Andrew Fisher
# Version: 0.3
# Date: 20/10/2011
ajfisher / generic_network_pulser.pde
Created Oct 16, 2011
Pulse an arduino PWM pin by hitting a URL over the network
View generic_network_pulser.pde
Generic networked pulser
Sets up a web page and every time a url is hit then it conducts and action
Author: Andrew Fisher
Date: 29 September 2011
Version 0.2
ajfisher / networked_temperature_sensor.pde
Created Oct 16, 2011
Basic networked temperature sensor that displays a web page for arduino
View networked_temperature_sensor.pde
Basic Networked temperature sensor.
Displays a web page with the temperature on it.
Author: Andrew Fisher
Date: 30 September 2011
Version 0.1
ajfisher /
Created Jan 15, 2012
Send a twitter message to a serial connection on an arduino
# Twitter stream analyser and serial activator (TSASA)
# This script analyses a twitter stream for keywords using the twitter
# streaming api - off the back of it, it then makes a serial request passing
# the message across to the serial device
# This was done fopr LCA2012 as an extension to the more code generator that
# Luke Weston build for the LeoStick
ajfisher /
Created May 30, 2012
Convert an 888 RGB value to 565 hex
# Author: Andrew Fisher
# Version: 0.1
# Date: 30/05/2012
# Licence: BSD
# This python converts an rgb value expressed in 8 bit values (eg 255, 128, 0) and returns a hex value that
# has been converted to 565 format. This was highly useful when I was playing with some Arduino
# stuff requiring 16 bit LCD designs and couldn't remember the hex layout.
def rgb_hex565(red, green, blue):
ajfisher / LICENSE
Last active Dec 4, 2018
Set up some Christmas lights to pulse depending on keywords being made on twitter
Copyright (c) Andrew Fisher and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
View .bash_aliases
alias fritzing='~/fritzing/fritzing-0.8.0b.linux.AMD64/Fritzing'
alias avahi='avahi-browse --all'
ajfisher /
Last active Mar 1, 2018
CSS fixes to Twitter web client to remove all the inline previews

Twitter Web Client Inline Image Removal

If you're a heavy user of the Twitter web client like me then you'll find the new inline preview feature extremely intrusive as it breaks up the timeline too much. If I wanted to use facebook or linkedin then I'd be using facebook or linkedin. Having said that, cards in Twitter are great and the ability to preview media before jumping off site is really cool - but it should be my choice, not have everything foisted on my timeline.

That the mobile client allows for this with a setting is even more annoying.

So here's the fix. This only works in Chrome but I'm sure an enterprising person could do something similar for Safari and Firefox using the same CSS. Pull requests to update instructions for other browsers are of course very welcome.


ajfisher / firmatatest.js
Last active Jul 18, 2019
Serial comms over hardware UART for Johnny-Five between Arduino and a Raspberry Pi
View firmatatest.js
var firmata = require('firmata');
var repl = require('repl');
var board = new firmata.Board('/dev/ttyAMA0',function(err){
//arduino is ready to communicate
if (err) {
console.log("err:" + err);
console.log("Firmata Firing LEDs");
You can’t perform that action at this time.