Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not running on a RPi #27

Open
daBee opened this issue Mar 16, 2022 · 2 comments
Open

not running on a RPi #27

daBee opened this issue Mar 16, 2022 · 2 comments

Comments

@daBee
Copy link

daBee commented Mar 16, 2022

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)
@DeeJay
Copy link

DeeJay commented Mar 18, 2022

To save the owner of this repo some investigation -

The current released version of Ben Croston's RPi.GPIO library is V0.7.1, and the corresponding Release Notes say "Added detection of Zero 2 W"
Ref: https://pypi.org/project/RPi.GPIO/0.7.1/

It seems reasonable to infer that an RPi Zero 2 W board, not available at the time, was NOT supported by v0.7.0 in July 2019. And hence will not be supported by this Ruby Gem.

Re-creating this Gem by incorporating the v0.7.1 sources might provide a solution for the owner of the Issue?

@daBee
Copy link
Author

daBee commented Mar 18, 2022

As much as I would love to be able to write C, I do not. I couldn't even guess as to how to incorporate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants