Title: Using CFFI with c_environment · Issue #7 · pcduino/python-pcduino · GitHub
Open Graph Title: Using CFFI with c_environment · Issue #7 · pcduino/python-pcduino
X Title: Using CFFI with c_environment · Issue #7 · pcduino/python-pcduino
Description: The python lib provided for pcduino with gpio lacks quite a bit. In particular I am interested in in pulseIn function, which is not available. I tried to write my own, but I get strange behavior (this is for HC-SR04 distance sensor). I s...
Open Graph Description: The python lib provided for pcduino with gpio lacks quite a bit. In particular I am interested in in pulseIn function, which is not available. I tried to write my own, but I get strange behavior (t...
X Description: The python lib provided for pcduino with gpio lacks quite a bit. In particular I am interested in in pulseIn function, which is not available. I tried to write my own, but I get strange behavior (t...
Opengraph URL: https://github.com/pcduino/python-pcduino/issues/7
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using CFFI with c_environment","articleBody":"The python lib provided for pcduino with gpio lacks quite a bit. In particular I am interested in in pulseIn function, which is not available. I tried to write my own, but I get strange behavior (this is for HC-SR04 distance sensor).\nI see that another issue was closed asking people to use CFFI. It is not clear to me how to use it, so I tried the following and failed with ugly compile errors:\n\n```\nfrom cffi import FFI\nffi = FFI()\nlib = ffi.verify(\"#include \u003c~/c_enviroment/sample/core.h\u003e\")\n```\n\nas you can see I did not get far ( I am sure I am doing something totally wrong). I get this error:\n\n File \"/usr/local/lib/python2.7/dist-packages/cffi/ffiplatform.py\", line 51, in _build\n raise VerificationError('%s: %s' % (e.__class__.**name**, e))\ncffi.ffiplatform.VerificationError: CompileError: command 'gcc' failed with exit status 1\n\nI have also tried:\n\n```\nffi.verify(\"#include \\\"/home/ubuntu/c_enviroment/sample/core.h\\\"\")\n```\n\nThis time it will find core.h, but complain that it can not find all the other .h files like Arduino.h that core.h refers too.\n\nI would appreciate your help. Thank you\n","author":{"url":"https://github.com/sheepcloner","@type":"Person","name":"sheepcloner"},"datePublished":"2015-01-26T22:35:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/7/python-pcduino/issues/7"}
| 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:888967bf-a0f6-6cd7-af15-48e6a7f4cc16 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF90:12E7A0:BB24B:F6EB6:698665DD |
| html-safe-nonce | 5a18b0f23aef717509476582e9937490084ba2eb0f0cb246d47f5463117ad5c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjkwOjEyRTdBMDpCQjI0QjpGNkVCNjo2OTg2NjVERCIsInZpc2l0b3JfaWQiOiIyOTEyNTE1NzE0Mjk4ODMyMzQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e3f715f3c3d9705ce81857cb98b7df2d3c3c73646b943c56f4f1b9b5779d5f3c |
| hovercard-subject-tag | issue:55547782 |
| 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/pcduino/python-pcduino/7/issue_layout |
| twitter:image | https://opengraph.githubassets.com/30a8208c34608bd5ba9cddb35363a3958c945820ff6d796abd3dbe65aa7d01a4/pcduino/python-pcduino/issues/7 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/30a8208c34608bd5ba9cddb35363a3958c945820ff6d796abd3dbe65aa7d01a4/pcduino/python-pcduino/issues/7 |
| og:image:alt | The python lib provided for pcduino with gpio lacks quite a bit. In particular I am interested in in pulseIn function, which is not available. I tried to write my own, but I get strange behavior (t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sheepcloner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0403308ca6cb083b0a6f7b259383ecaf0bbe2cb9191ec72f8a482f1232ac1097 |
| turbo-cache-control | no-preview |
| go-import | github.com/pcduino/python-pcduino git https://github.com/pcduino/python-pcduino.git |
| octolytics-dimension-user_id | 3618220 |
| octolytics-dimension-user_login | pcduino |
| octolytics-dimension-repository_id | 8804125 |
| octolytics-dimension-repository_nwo | pcduino/python-pcduino |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8804125 |
| octolytics-dimension-repository_network_root_nwo | pcduino/python-pcduino |
| 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 | d67809d529afeb8666a295c7e2771bb11eca9927 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width