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
ajfisher / _readme.md
Last active Sep 14, 2019
Auto WiFi detection and hotspot creation in boot for RPI
View _readme.md

Auto WiFi detection or wifi hostpot creation during boot for RPI

Note: These are rough notes and there may be some variance as versions of raspbian get updated but should be pretty reliable as a guide.

This gist provides some instructions and config in order to have your Raspberry PI automatically connect to a roamed network, however if it fails to discover an available network it will set itself up as a wireless access point for you to connect to.

@ajfisher
ajfisher / blink.js
Last active Jul 30, 2019
BT LED Blinker
View blink.js
@ajfisher
ajfisher / _Ping I2C Johnny Five backpack.md
Last active Jul 28, 2019
Building an I2C backpack for HC-SR04 ultrasonic sensor
View _Ping I2C Johnny Five backpack.md

Building an ultrasonic sensor backpack

Note: This is a bit of a scratch to see what's involved in getting the ping sensor to work as an I2C backpack.

Acknowledgements

Dependencies.

@ajfisher
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);
return;
}
console.log("Firmata Firing LEDs");
@ajfisher
ajfisher / 0x00000.bin
Last active Jul 9, 2019
ESP8266 Transparent bridge to J5
View a_nodebot_over_wifi.md

Taking your nodebot wifi

Controlling your nodebot using a USB cable is great and all, and obviously you could shell out and grab a sparkcore or some other dedicated controller but what if you've got a standard arduino and you want to take an existing nodebot wireless?

Bluetooth is an option and there's this excellent JohnnyFive wiki entry that will help you there. Bluetooth can be a bit flaky though and it's range is pretty lousy. You can also look at things like XBees and what not using point to point serial, but these are expensive and very fiddly to get working.

Really, what we want is a method of transferring data over a nice, simple, standard method, requiring little configuration, low cost and we can utilise a whole stack of the code we've already produced.

Enter the WiFi232 module. These little beauties are [available from AliExpress for $12 each](http://www.aliexpress.com/item/USR-WIFI232-T-wifi-to-uart-tt

@ajfisher
ajfisher / _PWM for Servos.md
Last active Feb 9, 2019
Description of Servo PWM as opposed to normal PWM
View _PWM for Servos.md

Servo PWM vs "Normal" PWM

This started from a chat in the [https://gitter.im/rwaldron/johnny-five](Johnny Five Gitter) and I thought I'd put some notes together because this comes up relatively often as people run into the terminology confusion that is caused by the Servo Manufacturers adopting the term PWM and it's usage amongst the Arduino community in relation to analogWrite().

This is my attempt at an explanation so if I've made any mistakes then please PR and we can make this better for everyone.

Servo is generally served by PWM support, right?

Sort of - PWM is typically a reference to an on/off duty cycle time - if I set my duty cycle to 50% then my pulses are on for 50% of the time and off for 50% of the time. If it's 10% then it's on 10% of the time, off 90%.

@ajfisher
ajfisher / LICENSE
Last active Dec 4, 2018
Set up some Christmas lights to pulse depending on keywords being made on twitter
View LICENSE
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
@ajfisher
ajfisher / colour_converter.py
Created May 30, 2012
Convert an 888 RGB value to 565 hex
View colour_converter.py
# 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):
View .bash_aliases
alias fritzing='~/fritzing/fritzing-0.8.0b.linux.AMD64/Fritzing'
alias avahi='avahi-browse --all'
You can’t perform that action at this time.