Open
Description
Testing this setup on a Raspberry Pi 2 Zero W, I get an error that it doesn't think it's running on a RPi. I'm not sure if it's the recent release of this unit, so I thought I would post.
RPi::GPIO.set_numbering :board
PINS = [5,7,11,13,14,16,18]
PINS.each do |i|
RPi::GPIO.setup i, as: :input
puts "#{ i } high? #{ RPi::GPIO.high?(i) }"
end
Traceback (most recent call last):
3: from test.rb:22:in `<main>'
2: from test.rb:22:in `each'
1: from test.rb:23:in `block in <main>'
test.rb:23:in `setup': not running on a RPi (RuntimeError)
Metadata
Metadata
Assignees
Labels
No labels