Go to advanced search

by RobinMosedale
Sat Jul 27, 2019 2:53 pm
Forum: Python
Topic: ESP32 Micropython asyncio queue overflow
Replies: 4
Views: 244

Re: ESP32 Micropython asyncio queue overflow

Indeed, I've had a response from the micropython forum. As expected it's not a fault, but an overload. The original code is fine. On one esp32 it was purposely modified to publish a response to message received, itself providing +ve feedback and resonance. It coped splendidly. Soak tested for more t...
by RobinMosedale
Fri Jul 26, 2019 9:33 pm
Forum: Python
Topic: ESP32 Micropython asyncio queue overflow
Replies: 4
Views: 244

Re: ESP32 Micropython asyncio queue overflow

Thank you Blimpy. Astonishing. This will be the second fault report that I'll be posting on their GITHUB repository in so many weeks. This example is the most elementary use of asyncio co-routines built directly on the micro python example. Don't they test even the most elementary use. I'll try a di...
by RobinMosedale
Fri Jul 26, 2019 7:44 pm
Forum: Python
Topic: ESP32 Micropython asyncio queue overflow
Replies: 4
Views: 244

ESP32 Micropython asyncio queue overflow

Further to the endeavours to get the resilient asynchronous mqtt to work, I can with the single thread example It was modified in a minor manner to publish a message in acknowledgement of receiving a subscribed message, an added line in the flash blue led The whole was now set to add a concurrent th...
by RobinMosedale
Thu Jul 25, 2019 7:41 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

So versions all scrubbed and the test asyncio mqtt demo programme works A minor alteration to include a publish function worked. Good progress The a trvial asyncio function to switch an external LED. runs for a few seconds and then I get :- "IndexError: queue overflow" see below Can't see what I'm d...
by RobinMosedale
Sat Jul 20, 2019 7:01 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

That's really most generous MrYsLab.

Hold fire a little while, I'm in conversation with the author, Peter.

There's something odd with my version of uasyncio

Robin
by RobinMosedale
Sat Jul 20, 2019 12:14 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

An array of 6 esp32's. One acting as accesspoint 1 rpi3 running a large app in tkinter. mqtt broker on pi all will need to rx/tx interrupts in from esp32's time tagged (I know about the drift) Speeds calculated, commands tx to control Some non realtime pwm to control servos All need compatible comms...
by RobinMosedale
Fri Jul 19, 2019 8:32 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

I know now that it can be set non-blocking.
I'd be grateful for your example
by RobinMosedale
Fri Jul 19, 2019 8:01 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

I shall create a fault report.
Banyan?
Perhaps
However this mechanism is the third avenue that I've attempte.
So please do point my to where I might find the correct variant for the esp32 together with a compatible variant for the pi3
by RobinMosedale
Fri Jul 19, 2019 4:13 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

"import asyncmqtttest.py Traceback (most recent call last): File "<stdin>", line 1, in <module> File "asyncmqtttest.py", line 39 SyntaxError: invalid syntax" It's the "await client.connect()" in def main below Why oh for goodness why? from machine import Pin import socket import sys import network i...
by RobinMosedale
Mon Jul 01, 2019 6:38 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

I'm going to be quiet for a while. A major rethink is necessary. My esp32's aren't living up to sales hype of easy comms and low level monitoring/control in real time. The dilemma is that I've too much invested in the tkinter application on the Pi3, several thousand lines of code. The esp32's run mi...
by RobinMosedale
Sat Jun 29, 2019 7:25 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

@Robin, In your code examples from your first message, What locks down the thread (and async tasks are never executed) is using time.sleep() in eg: while True: print ("Running") time.sleep(.05) Should use asyncio.sleep() instead, that passes control back to the event loop which in turn runs schedul...
by RobinMosedale
Sat Jun 29, 2019 1:10 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

I'm more than grateful for all the responses, so very cogent replies here. I've looked at MQQT. It's blocking. I'll reply later on the nature of the apps, but essentially as in the OP the esp's do low level interrupt handling around what may be called a track, IR sensor's triggering interrupts at kn...
by RobinMosedale
Thu Jun 27, 2019 11:29 am
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Re: Run a asyncio socket function a a thread

My thanks Blimpyway, I'm more than grateful. I'll certainly try this avenue. Before I do, I wonder if I could ask:- The critical issue here is 'real time'. The signals that my ESP32's are interrupted by are time critical:- they're used for calculating speed across the sensors distributed around the ...
by RobinMosedale
Wed Jun 26, 2019 7:48 pm
Forum: Python
Topic: Run a asyncio socket function a a thread
Replies: 21
Views: 1228

Run a asyncio socket function a a thread

I'm learning all about threads, asyncio, all because I wish to run a non blocking server. I'm conscious that there are several variants according to which version of python. I'm running on a Pi3 with python 3.4.2 or 2.7.9 I'm running micropython version 1.11 on several esp32's I'll constrain my exam...
by RobinMosedale
Mon Jun 03, 2019 12:19 pm
Forum: Python
Topic: Python3 network module seems not to have WLAN attribute
Replies: 13
Views: 777

Re: Python3 network module seems not to have WLAN attribute

You are tring to run MicroPython code on a RPi. The network module of MicroPython is not a part of the standard Python language and it's not available (or necessary) on Raspbian Linux. Setting up a WLAN connection is handled entirely by the operating system: https://www.raspberrypi.org/documentatio...
by RobinMosedale
Mon Jun 03, 2019 12:09 pm
Forum: Python
Topic: Python3 network module seems not to have WLAN attribute
Replies: 13
Views: 777

Re: Python3 network module seems not to have WLAN attribute

Note The indentation around:- "print("waiting to Connect") print (station.ifconfig()) time.sleep(1) " ........................... keeps being removed by this webpage no matter whether I substitute spaces or not. Be assured they are 'Python' indented Put your code in a 'code block' to preserve forma...
by RobinMosedale
Sun Jun 02, 2019 7:58 pm
Forum: Python
Topic: Python3 network module seems not to have WLAN attribute
Replies: 13
Views: 777

Re: Python3 network module seems not to have WLAN attribute

Here is the code:- import network import time station=network.WLAN(network.STA_IF) station.active(True) station.connect("TP-LINK_EB850C", "ju87bstuka") while (not (station.isconnected())): print("waiting to Connect") print (station.ifconfig()) time.sleep(1) station.ifconfig() print ("Connected") Con...
by RobinMosedale
Sun Jun 02, 2019 11:51 am
Forum: Python
Topic: Python3 network module seems not to have WLAN attribute
Replies: 13
Views: 777

Re: Python3 network module seems not to have WLAN attribute

Downloaded the indicated module, inspected, and that doesn't contain the standard WLAN objects either. I am merely at this stage establishing a station and connecting to the Wifi. Nothing more at this stage. I'm puzzled. Nearly all the python examples that come up on searches use these objects 'WLAN...
by RobinMosedale
Sat Jun 01, 2019 10:25 pm
Forum: Python
Topic: Python3 network module seems not to have WLAN attribute
Replies: 13
Views: 777

Re: Python3 network module seems not to have WLAN attribute

Thanks Dougie, I'll do a thorough check tomorrow
by RobinMosedale
Sat Jun 01, 2019 8:43 pm
Forum: Python
Topic: Python3 network module seems not to have WLAN attribute
Replies: 13
Views: 777

Re: Python3 network module seems not to have WLAN attribute

I'm under REPL interactive line by line input as i have done with esp32.

Perhaps I've downloaded the wrong module 'network'

If someone could point me to a reliable source for the network module I'd be most grateful
by RobinMosedale
Sat Jun 01, 2019 7:57 pm
Forum: Python
Topic: Python3 network module seems not to have WLAN attribute
Replies: 13
Views: 777

Python3 network module seems not to have WLAN attribute

I'm successfully setting up esp32's to connect to my internal Wifi network, and turning to the Pi I' attempting to do the same before progressing to socket comms. after installing the network module and attempting: import network station=network.WLAN(network.STA_IF) Traceback (most recent call last)...
by RobinMosedale
Sat Mar 23, 2013 11:09 am
Forum: Beginners
Topic: Printer installation - should it be this difficult
Replies: 23
Views: 9010

Re: Printer installation - should it be this difficult

efflandt said:- "Connection: socket://ip_address:9100 (where ip_address is actual IP address of printer). The :9100 is the JetDirect port for the default queue on the printer." Thank you sincerely efflandt. An answer that addresses the question of ip subaddress at last. Yes it is a network printer. ...
by RobinMosedale
Sun Mar 17, 2013 9:27 pm
Forum: Beginners
Topic: Printer installation - should it be this difficult
Replies: 23
Views: 9010

Re: Printer installation - should it be this difficult

Thanks, DIYKiwi, you certainly have perseverance. Unfortunately, I'd already pursued the advice concerning CUP, Lpadmin, and update with apt, including installing the synaptic package manager, together with endless searches on Linux forums, all to no avail. Such was this simple task, together with s...
by RobinMosedale
Sat Mar 02, 2013 12:08 pm
Forum: Beginners
Topic: Printer installation - should it be this difficult
Replies: 23
Views: 9010

Re: Printer installation - should it be this difficult

Thanks, Keith,

But I've done all that. CUPS or whatever just won't detect it.

I've manually configured the address and ports in many combinations, but a print job just sits there remarking, printer is busy.

Thanks anyway

Robin
by RobinMosedale
Wed Feb 27, 2013 1:26 pm
Forum: Other programming languages
Topic: FORTRAN X-Windows
Replies: 3
Views: 1244

FORTRAN X-Windows

I'm using gFORTRAN to refresh some rusty programming skills and finding it rewarding. However, I would like to be able to produce screen output a little more prettily than the usual line output, say, open a window, postion text, highlight it and so forth, nothing more sphisticated than that. Can any...

Go to advanced search