Hi all.
I have recently written a small touch library (http://github.com/ulno/libni) for the esp8266. I also designed a workshop for using this to build with students a tin foil based touch game controller (just presented on FOSSASIA 2016). However, using C in an introductory class (and especially flashing boards where the serial connectors are not soldered on correctly) can be pretty tedious, so I was wondering how I could compile my own native library into the firmware or even load it later. Then students could just use the Python command line to configure their controller. The library is very time critical and some blocks need to run atomically for some microseconds. Python itself is unlikely to be fast enough to handle this core directly. However the major part is probably easy to run also as Python code.
Where would I start with this?
Add own native library (example touch controller)
Re: Add own native library (example touch controller)
Sure you can write the core in C (I have not used c++). There are quite a few examples on the forum and some good ones in the source tree. I have done about 5 C device drivers, it's pretty easy if you can find examples of how to manipulate the python data, so for example the 1wire python binding:https://github.com/mianos/micropython/b ... sp_1wire.c
I am sure there will be a few more of these when the esp8266 code is released later in the year.
I am sure there will be a few more of these when the esp8266 code is released later in the year.
Re: Add own native library (example touch controller)
No, this doesn't look too hard and the time critical-part is anyway low level C-code, so should be doable. So, I just check out the stuff from github and set-up cross compiler toolchain and try to get going with a small hello-world based on the 1-wire code?
Thanks,
ulno
Thanks,
ulno