GPIO pin state reset when script terminates
ErezFL
New Member Posts: 2 ✭
I was using Rpi before and changed to Up.
Using the patched Linux to enable GPIO pin set\get.
Using the same python scripts I was using on Rpi
I can change and set the right pin state to high\low.
However, on the UP when the script terminates the pin state ALWAYS resets,
meaning while on Rpi I could change the pin state to high and
it remained in this state until explicitly changed even when the script terminated.
Can you please advice what needs to be changed\configured for so the pin state
would not reset when the script terminates ?
Thank you :-)
Tagged:
Comments
-
Could you share the script that you are using?
-
sure, it's a very simple one
!/usr/bin/env python
import RPi.GPIO as gpio
if name == "main":
returncode = 1
gpio.setmode(gpio.BCM)
gpio.setwarnings(False)gpio.setup(17, gpio.OUT) gpio.output(17, gpio.LOW)
Tagged
Categories
- All Categories
- 105 Announcements & News
- 5.4K Product News - New Product/Product Change Notice/ End-of-life
- 346 Welcome Developers!
- 169 Unboxing & Project Sharing
- 12.6K Tech Updates
- 6.9K UP Products
- 170 UP 7000
- 22 UP Squared i12
- 5.9K UP Xtreme i12
- 34 UP Squared Pro 7000
- 12 UP Element i12 Edge
- 24 UP Squared V2
- 71 UP 4000
- 32 UP Xtreme i11
- 36 UP Squared 6000
- 67 UP Squared Pro
- 174 UP Xtreme
- 847 UP Squared
- 1.4K UP Board
- 90 UP Core Plus
- 223 UP Core
- 4 UP Xtreme Lite
- 44 UP AI Edge
- 223 Starter Kits & Peripheral