Search found 84 matches

by mianos
Tue May 24, 2016 10:52 pm
Forum: MicroPython pyboard
Topic: Make real 50.000ms delay
Replies: 3
Views: 4189

Re: Make real 50.000ms delay

The normal way to do this is in two stages. Use a hardware timer to trigger a reading interrupt handler. Read the value in the interrupt handler and save it to a circular buffer, doing the least amount of of work. This can now be read outside of the interrupt. If your interrupt priority is set up co...
by mianos
Mon May 16, 2016 9:34 pm
Forum: ESP8266 boards
Topic: Eternal September
Replies: 4
Views: 45341

Re: Eternal September

Totally agree. Nuff said.
by mianos
Fri May 06, 2016 11:17 am
Forum: Announcements and News
Topic: Multi-threading support, sponsored by Pycom
Replies: 22
Views: 162981

Re: Multi-threading support, sponsored by Pycom

If you only have a native queues managed by a mutex (like I did in my mp port), you can get a long way there. (AmigaOS was basically co-operative threads with messages passed between threads in queues with all the data shared in a single address space. The scheduler simply distributed between thread...
by mianos
Thu May 05, 2016 9:58 pm
Forum: Announcements and News
Topic: Multi-threading support, sponsored by Pycom
Replies: 22
Views: 162981

Re: Multi-threading support, sponsored by Pycom

It would be an interesting outcome if entity level locking was added to the micropython data structures. Micropython could well become a choice over cpython, even under Linux, for situations where real threading is needed. Now that normal CPUs have more and more cores and removing the GIL has proven...
by mianos
Sun Apr 17, 2016 10:09 pm
Forum: General Discussion and Questions
Topic: How to reduce the memory consumption of the object definition
Replies: 25
Views: 21598

Re: How to reduce the memory consumption of the object definition

LZO would be an interesting choice. The decompresser is very small. It would be fun to make a plugin. I'll give it a go next week.
by mianos
Thu Apr 14, 2016 10:07 am
Forum: General Discussion and Questions
Topic: Event Driven Architecture
Replies: 7
Views: 8906

Re: Event Driven Architecture

Just something to keep in mind is you can't allocate python objects when in an interrupt handler. (I pre-allocated them, but just using a simple C circular queue is probably more sensible).
by mianos
Sun Apr 10, 2016 12:28 am
Forum: General Discussion and Questions
Topic: Event Driven Architecture
Replies: 7
Views: 8906

Re: Event Driven Architecture

Each to their own. For my ESP code, I use the system main loop as an execution thread and then do everything else in interrupts. For example, for the buttons, I attach an interrupt handler on both edges and, in the handler I send a message down a queue. (For my queue I wrote one in C but used pre-al...
by mianos
Sat Apr 02, 2016 8:30 am
Forum: ESP8266 boards
Topic: Call for testsuite running results
Replies: 31
Views: 28074

Re: [URGENT] Call for testsuite running results

NodeMCU from aliexpress: 405 tests performed (13213 individual testcases) 405 tests passed WEMOS D1: 405 tests performed (13213 individual testcases) 405 tests passed Itead studio 'sonoff' ESP with a PSU and relay on board. 405 tests performed (13213 individual testcases) 405 tests passed An origina...
by mianos
Wed Mar 30, 2016 9:28 am
Forum: ESP8266 boards
Topic: i2c multi-byte read for ESP8266? (e.g. RTC1307)
Replies: 18
Views: 16025

Re: i2c multi-byte read for ESP8266? (e.g. RTC1307)

I have a Ds3231 and have used my own ESP8266 fork with multi byte read i2c.write([self.DS3231_ADDR_TIME], self.DS3231_DEVICE_ADDR) return self.format_da(list(map(self.bcdToDec, i2c.read(7, self.DS3231_DEVICE_ADDR)))) So, it's not a problem with the bit banging I2C and ESP8266 (ie. it is totally fixa...
by mianos
Tue Mar 22, 2016 9:04 pm
Forum: ESP8266 boards
Topic: Add own native library (example touch controller)
Replies: 2
Views: 3183

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:htt...