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: patch-diff.githubusercontent.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:89f715b6-4f26-8c80-fbea-2116cb27f951 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 93E2:59C53:8AE2C4:B96A21:697316F5 |
| html-safe-nonce | 7e7cf057ee5cc2bd45c9b5b680679a2edfded9fc5ec851fc8934abab4aa6bc08 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0UyOjU5QzUzOjhBRTJDNDpCOTZBMjE6Njk3MzE2RjUiLCJ2aXNpdG9yX2lkIjoiNDkyNzQ4MjA5Nzc0OTM5OTI4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9d7bed97c6dd992c3d92fcdfd093b07011dc3c521144d973ecc3d663666cb623 |
| 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 | 44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4 |
| 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 | a5e2b48bd1260476599758f5d253b5d24092ab84 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width