python-pcduino's People
Forkers
ciemaar ryguy1064 gaochunzy orangevaliel djmorrsee maczies yingcloud githubhansonliu marianri glockwork kyumoka greyfoxrgr weichaojie sts0mrg0python-pcduino's Issues
Using CFFI with c_environment
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 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:
from cffi import FFI
ffi = FFI()
lib = ffi.verify("#include <~/c_enviroment/sample/core.h>")
as you can see I did not get far ( I am sure I am doing something totally wrong). I get this error:
File "/usr/local/lib/python2.7/dist-packages/cffi/ffiplatform.py", line 51, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.ffiplatform.VerificationError: CompileError: command 'gcc' failed with exit status 1
I have also tried:
ffi.verify("#include \"/home/ubuntu/c_enviroment/sample/core.h\"")
This 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.
I would appreciate your help. Thank you
What happened with pwm?
Hello, I'm really curios to know, why the PWM was removed.
Thanks
rewrite to use cffi
eeror
The following error occurred while I was editing my project: No such file or directory :/sys/class/misc/pwmtimer/enable
pwm pins exhibit bimodal behavior
Edit: see below for how to reproduce
Sometimes a PWM pin will get in to a mode where values
0: off
1:
2: <same as 1>
i.e. setting a value >= 1 will cause it to emit at a certain frequency (I've seen low values and high values), but no value > 1 will change it.
The actual value written can still be read.
Rebooting the device fixes the issue.
latest image breaks current version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.