Search found 50 matches
- Wed Apr 06, 2022 11:05 am
- Forum: Programs, Libraries and Tools
- Topic: Android Bluetooth remote control for µP/ESP32
- Replies: 2
- Views: 4532
Android Bluetooth remote control for µP/ESP32
Some time ago i wrote ftDuinoBlue http://ftduino.de/blue , a simple library for the Arduino+HM10-Bluetooth with an accompaning Android app. The idea was to store a simple description of a GUI with the Arduino sketch so that the Android app can read that from the arduino and draw a GUI accordingly. T...
- Sun Feb 27, 2022 10:44 am
- Forum: Programs, Libraries and Tools
- Topic: µPIDE a new IDE for beginners
- Replies: 38
- Views: 24499
Re: µPIDE a new IDE for beginners
Finally I found the culprit of the low performance under Windows: Pyserials inWaiting() function is extremely slow on Windows 10 and the pyboard.py makes excessive use of that. So I implemented a little buffer between pyboard.py and pyserial which buffers and caches serial data. It will thus reduce ...
- Fri Feb 25, 2022 4:33 pm
- Forum: Programs, Libraries and Tools
- Topic: µPIDE a new IDE for beginners
- Replies: 38
- Views: 24499
Re: µPIDE a new IDE for beginners
A caching wrapper around pyserial gives a ~5% improvement ... under Linux as well as under Windows 10. Unfortunately pyboard.py's fs_get is still ~5 times slower under Win10 than under Linux. And it's purely pyboard.py related. My own old code runs the same speed as Linux on that same Win10 PC.
- Fri Feb 25, 2022 1:56 pm
- Forum: Programs, Libraries and Tools
- Topic: µPIDE a new IDE for beginners
- Replies: 38
- Views: 24499
Re: µPIDE a new IDE for beginners
FYI, are you aware of https://github.com/micropython/micropython/blob/master/tools/pyboard.py -- rather than maintain your own board remote control library. A lot of work has gone into making pyboard.py reliable and efficient. I have now switched to pyboard.py. This actually made up- and download o...
- Fri Feb 11, 2022 5:55 pm
- Forum: General Discussion and Questions
- Topic: asyncio.start_server example (!)
- Replies: 18
- Views: 13838
Re: asyncio.start_server example (!)
So how do i catch a Keyboard interrupt (or any other exception) without interrupting the loop?
- Fri Feb 11, 2022 3:14 pm
- Forum: General Discussion and Questions
- Topic: asyncio.start_server example (!)
- Replies: 18
- Views: 13838
Re: asyncio.start_server example (!)
I was hoping that something like this would do the trick: loop = asyncio.get_event_loop() server_task = loop.create_task(asyncio.start_server(serve, "0.0.0.0", 80)) try: loop.run_forever() except KeyboardInterrupt: print("closing") finally: server_task.cancel() But it doesn't. Maybe because the enti...
- Fri Feb 11, 2022 1:17 pm
- Forum: General Discussion and Questions
- Topic: asyncio.start_server example (!)
- Replies: 18
- Views: 13838
Re: asyncio.start_server example (!)
Thanks for the link. That code indeed tries to solve the same problem by allowing to re-use ports: https://github.com/micropython/micropython/blob/e8bc4a3a5be12ad639b811852337c63e8f1d6277/extmod/uasyncio/stream.py#L138 But that doesn't seem to work. I do have a completely different async server deri...
- Thu Feb 10, 2022 9:11 pm
- Forum: General Discussion and Questions
- Topic: asyncio.start_server example (!)
- Replies: 18
- Views: 13838
Re: asyncio.start_server example (!)
import uasyncio as asyncio import utime async def serve(reader, writer): t = utime.ticks_ms() resp = b"HTTP/1.0 200 OK\r\n\r\n" + "Ticks = {TICKS}\r\n".format(TICKS=t) l = await reader.read(256) # yield from may not work print(l) for _ in range(100): # More RAM friendly than sending one huge string...
- Tue Feb 01, 2022 11:57 am
- Forum: General Discussion and Questions
- Topic: Add frozen code to the machine module?
- Replies: 2
- Views: 7519
Re: Add frozen code to the machine module?
If I understand your need accordingly, I think Damien is cooking something up: Thanks for the response. But ... no, I don't think this is what I am searching for. I don't have a problem including my code into the firmware. This already works. I can add port/esp32/modules/mymachine/Encoder.py This w...
- Fri Jan 28, 2022 10:31 am
- Forum: General Discussion and Questions
- Topic: Add frozen code to the machine module?
- Replies: 2
- Views: 7519
Add frozen code to the machine module?
There are discussions about machine.Encoder and machine.Counter classes in github. These are implemented in C. I would like to give a python variant a trial and would like to add it as a frozen class to the machine module so my versions are compatible with the ones from the existing PR's. Is that po...