Title: State of output pins is not persistent · Issue #55 · romilly/quick2wire-python-api · GitHub
Open Graph Title: State of output pins is not persistent · Issue #55 · romilly/quick2wire-python-api
X Title: State of output pins is not persistent · Issue #55 · romilly/quick2wire-python-api
Description: The state of the an output is not persistent. The code below will set GPIO pin 0 to high. I expected the pin to stay high after this little script has finished. But that is not the case. I found out that the value of the pin drops to low...
Open Graph Description: The state of the an output is not persistent. The code below will set GPIO pin 0 to high. I expected the pin to stay high after this little script has finished. But that is not the case. I found ou...
X Description: The state of the an output is not persistent. The code below will set GPIO pin 0 to high. I expected the pin to stay high after this little script has finished. But that is not the case. I found ou...
Opengraph URL: https://github.com/romilly/quick2wire-python-api/issues/55
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"State of output pins is not persistent","articleBody":"The state of the an output is not persistent. The code below will set GPIO pin 0 to high. I expected the pin to stay high after this little script has finished. But that is not the case. I found out that the value of the pin drops to low when Python leaves the context manager.\n\nWhen Python leaves the context manager, [PinApi.__close__()](https://github.com/quick2wire/quick2wire-python-api/blob/master/quick2wire/gpio.py#L48) is called and this method eventually [changes the direction of the pin to input](https://github.com/quick2wire/quick2wire-python-api/blob/master/quick2wire/gpio.py#L113).\n\n```\nfrom quick2wire.gpio import pins, Out\nfrom time import sleep\nwith pins.pin(0, direction=Out) as pin:\n pin.value = 1\n sleep(1)\n# Pin drops to low.\n```\n","author":{"url":"https://github.com/OrangeTux","@type":"Person","name":"OrangeTux"},"datePublished":"2014-10-05T13:03:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/55/quick2wire-python-api/issues/55"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:afdb5708-9ce0-5c00-2c67-6c3afd0b609f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E536:F5661:42B245:5BA834:696A7628 |
| html-safe-nonce | 5614994f056a4d42a5006c5090964bf3737b7f7ff9c4f053e0ae80692c9a9ccb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTM2OkY1NjYxOjQyQjI0NTo1QkE4MzQ6Njk2QTc2MjgiLCJ2aXNpdG9yX2lkIjoiNjIxMDYzODcwNTk2NjM0NzgxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8fcbd5f658272d353a11d439d7523d2fb9a0eed7516f9d728fd903a308feef37 |
| hovercard-subject-tag | issue:44913689 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/romilly/quick2wire-python-api/55/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7df6136a3b610b34767b1b71600ca19c684eb9a1fcdebbca9ef7928d7fac17f7/romilly/quick2wire-python-api/issues/55 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7df6136a3b610b34767b1b71600ca19c684eb9a1fcdebbca9ef7928d7fac17f7/romilly/quick2wire-python-api/issues/55 |
| og:image:alt | The state of the an output is not persistent. The code below will set GPIO pin 0 to high. I expected the pin to stay high after this little script has finished. But that is not the case. I found ou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | OrangeTux |
| hostname | github.com |
| expected-hostname | github.com |
| None | cfa223d62d272274e0b68350b4bd7741f3ca7498b8c4b8b1bc1e6deabbdbc09d |
| turbo-cache-control | no-preview |
| go-import | github.com/romilly/quick2wire-python-api git https://github.com/romilly/quick2wire-python-api.git |
| octolytics-dimension-user_id | 149310 |
| octolytics-dimension-user_login | romilly |
| octolytics-dimension-repository_id | 4207383 |
| octolytics-dimension-repository_nwo | romilly/quick2wire-python-api |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 4207383 |
| octolytics-dimension-repository_network_root_nwo | romilly/quick2wire-python-api |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a0b6893c221f98f607598e939299fdf5763435d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width