Last active
October 27, 2018 06:45
-
-
Save scls19fr/0e95131dc3ec6cd061da11377445215d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pin = Pin(GhostBoard(), Digital(), BCM(13))
function Board(s::AbstractString)
s = lowercase(s)
if s in ["", "rpi", "raspberry"]
RaspberryPiBoard()
elseif s in ["ghost"]
GhostBoard()
else
error("'$s' is not an allowed board")
end
end
function Board()
Board("")
end
Should provide a register
function
register!(Pingo.SUPPORTED_BOARDS, RaspberryPiBoard, ["rpi", "raspberry", "raspberrypi"])
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/scls19fr/Pingo.jl
see RaspberryPi-Samples/roadmap#1
and https://github.com/JuliaBerry/PiGPIO.jl
and https://github.com/scls19fr/roadmap_private/issues/17
is_virtual
is attribute is a bad idea to manage a virtual / ghost push button (used for testing purpose)maybe we should have
Button
andGhostButton
orVirtualButton
https://gist.github.com/scls19fr/0e95131dc3ec6cd061da11377445215d#file-pingo-jl-L103
Pin have a board attribute so
should be replaced by
Board("")
shouldn't always return aRaspberryPiBoard
(should depend on which board it's running)