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

Code related to two colors LED and power button. #1

Open
net4u opened this issue Mar 1, 2024 · 5 comments
Open

Code related to two colors LED and power button. #1

net4u opened this issue Mar 1, 2024 · 5 comments

Comments

@net4u
Copy link

net4u commented Mar 1, 2024

Hello! Can I ask you to help me extract from your source code, only what is strictly related to the power button and the two LEDs (red and green).

@alanb128
Copy link
Owner

alanb128 commented Mar 1, 2024

Hi @net4u - For power on, the momentary switch just needs to connect pin 3 of the PI to ground momentarily. The red and green LEDs are connected to GPIO pins (with resistors) as outputs. In the power on sequence, the red LED is tuned off and the green is turned on. During shutdown, the opposite occurs. Let me know if you need more details!

@net4u
Copy link
Author

net4u commented Mar 2, 2024

Hi. I will try tomorrow and then come with feedback. I have to search for an extra LED in my "archived electronics boxes". Thnx a lot.

@net4u
Copy link
Author

net4u commented Mar 4, 2024

Beyond "import RPI.GPIO" I also need to import the other libraries?

@net4u
Copy link
Author

net4u commented Mar 4, 2024

Beyond import RPI.GPIO I need also to import the other libraries?

@alanb128
Copy link
Owner

alanb128 commented Mar 6, 2024

You only need the other libraries if you are doing more than setting the values for the GPIO pins. In other words, if you're just turning on and off the LEDs, that should be the only library you'll need. If you do require another library, an error message should alert you as to which one is missing.

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