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

Need to support other GPIOs for button and LED #57

Closed
shawaj opened this issue Aug 10, 2021 · 2 comments
Closed

Need to support other GPIOs for button and LED #57

shawaj opened this issue Aug 10, 2021 · 2 comments
Assignees

Comments

@shawaj
Copy link
Member

shawaj commented Aug 10, 2021

Here we only handle the indoor and outdoor miner buttons...

# Setup GPIO Devices
variant = os.getenv('VARIANT')
if (variant == "NEBHNT-IN1") or (variant == "Indoor"):
buttonGPIO = 26
statusGPIO = 25
else:
buttonGPIO = 24
statusGPIO = 25
userButton = Button(buttonGPIO, hold_time=2)
statusLed = LED(statusGPIO)

However in the variant details file we already have the STATUS and BUTTON values which we can use instead.

@shawaj
Copy link
Member Author

shawaj commented Aug 10, 2021

Guess we can just change this to:

buttonGPIO = variantDetails['BUTTON']
statusGPIO = variantDetails['STATUS']

userButton = Button(buttonGPIO, hold_time=2) 
statusLed = LED(statusGPIO) 

@shawaj
Copy link
Member Author

shawaj commented Sep 10, 2021

Closed by #69

@shawaj shawaj closed this as completed Sep 10, 2021
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