Skip to content

Commit

Permalink
WHY THE BUTTON ACTIVE HIGH NOW
Browse files Browse the repository at this point in the history
  • Loading branch information
owenpark8 committed Sep 27, 2024
1 parent 530fbe0 commit c6d14fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/getting-started/starter/led/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ See below for a demo on how we can access data in our case.

![image](https://user-images.githubusercontent.com/71603173/187026399-f7aaea9b-1071-4b00-bc8c-94914f84419c.png)

When reading in the pin state PC13, do note that the value read depends on if the button is pushed down or released AND if the button is active low or active high. In our case, the button is active low. This means that when the button is pushed down, the value returned is a 0.
When reading in the pin state PC13, do note that the value read depends on if the button is pushed down or released AND if the button is active low or active high.
In our case, the button is active high. This means that when the button is pushed down, the value returned is a 1.

Based on this information, you should now be able to implement logic on how to link the button to the LED. If you need additional resources, you may choose to refer to [this](https://medium.com/vicara-hardware-university/stm32-guide-gpio-and-buttons-8303e6c8cb44) guide on how to GPIO pins and buttons. Also, you are always welcome to ask another member for help!

Expand Down

0 comments on commit c6d14fc

Please sign in to comment.