Skip to content

Instantly share code, notes, and snippets.

@feiry
feiry / scratch_gpio_handler
Created February 6, 2013 02:13
Scratch GPIO Handler. Add in MotorDirectionA (pin13, pin18) and MotorDirectionB (pin15, pin16)
# This code is copyright Simon Walters under GPL v2
# This code is derived from scratch_handler by Thomas Preston
# Version 5dev 11Aug08 Much better looping supplied by Stein @soilandreyes
# and someone else @MCrRaspJam who've name I've forgotton!
# Version 6dev - Moved Allon/AllOff to be processed before single pins :)
# Vesion 7dev - start to tidy up changes
# Vesion 8dev - use gpio-output system and broadcast allon, 1on system
# V0.1 - change to 6 out 2 in and sanitise the code
# V0.2a - use global variable to trace Scratch disconnect
# V0.3a - Change to Broadcom GPIO numbering for variables