GPIO pin state reset when script terminates
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 :-)
Could you share the script that you are using?
sure, it's a very simple one
import RPi.GPIO as gpio
if name == "main":
returncode = 1
gpio.setup(17, gpio.OUT) gpio.output(17, gpio.LOW)
- 303 All Categories
- 104 Announcements & News
- 52 Product News - New Product/Product Change Notice/ End-of-life
- 184 Welcome Developers!
- 53 Unboxing & Project Sharing
- 24 Tech Updates
- 595 UP Products
- 6 UP Xtreme i12
- 1 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 13 UP Squared V2
- 41 UP 4000
- 24 UP Xtreme i11
- 34 UP Squared 6000
- 49 UP Squared Pro
- 140 UP Xtreme
- 828 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 221 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 215 Starter Kits & Peripheral