Skip to content

Commit

Permalink
Merge pull request #1484 from matsujirushi/patch-10
Browse files Browse the repository at this point in the history
Update recomputer_r.md
  • Loading branch information
grilliiiii authored Aug 5, 2024
2 parents 91f2b24 + a9fde5d commit 490a352
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@ Another way to use this function is Initiate a shutdown when GPIO pin changes. T
Use `/boot/overlays/README` as reference, then modify `/boot/config.txt`.

```bash
dtoverlay=gpio-shutdown, gpio_pin=GPIO25,active_low=1
dtoverlay=gpio-shutdown,gpio_pin=25,active_low=1
```

:::note
Expand All @@ -1494,10 +1494,10 @@ import time,os

num = 0

GPIO.setmode(GPIO,BCM)
GPIO.setmode(GPIO.BCM)
#set GPIO25 as input mode
#add 500ms jitter time for software stabilization
GPIO.setup(25,GPIO.IN,pull_up_down = GPIO.PUD_DOWN)
GPIO.setup(25,GPIO.IN,pull_up_down = GPIO.PUD_UP)
GPIO.add_event_detect(25,GPIO.FALLING, bouncetime = 500)
while True:
if GPIO.event_detected(25):
Expand Down Expand Up @@ -1549,4 +1549,4 @@ Thank you for choosing our products! We are here to provide you with different s
<div class="button_tech_support_container">
<a href="https://discord.gg/eWkprNDMU7" class="button_discord"></a>
<a href="https://github.com/Seeed-Studio/wiki-documents/discussions/69" class="button_discussion"></a>
</div>
</div>

0 comments on commit 490a352

Please sign in to comment.