Search found 5092 matches

by pythoncoder
Mon Apr 19, 2021 3:49 pm
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 6
Views: 251

Re: How do you catch getaddrinfo() errors

... That didn't take long ... took about 10 minutes for it to change from ('74.125.200.108', 465) to ('74.125.68.109', 465)... That's interesting. I wonder if the old address still worked? I'm no expert on this stuff but it's possible that Google maintain a pool of IP addresses and DNS servers serv...
by pythoncoder
Mon Apr 19, 2021 3:46 pm
Forum: General Discussion and Questions
Topic: Why does FrameBuffer not accept bytes objects?
Replies: 1
Views: 25

Re: Why does FrameBuffer not accept bytes objects?

I suggest you look at font-to-py . This solves the problem, enabling fonts to be accessed from flash with tiny RAM usage. The Writer and CWriter classes enable these to be rendered to any display whose driver is subclassed from FrameBuffer. Key features are the use of a memoryview for allocation-fre...
by pythoncoder
Mon Apr 19, 2021 3:41 pm
Forum: Raspberry Pi microcontroller boards
Topic: movw not working
Replies: 1
Views: 38

Re: movw not working

The Pico instruction set is ARM V6 whereas Pyboards are ARM V7. There are unsupported instructions including all the floating point ones.
by pythoncoder
Mon Apr 19, 2021 9:30 am
Forum: General Discussion and Questions
Topic: Web server In/out + physical button control via gpio
Replies: 7
Views: 249

Re: Web server In/out + physical button control via gpio

I haven't responded to this query because I lack web programming experience: I was hoping someone better qualified would pop up. I feel sure this can be done using uasyncio with a uasyncio-based server such as PicoWeb. I can explain how to use uasyncio to respond to hardware changes (see my tutorial...
by pythoncoder
Mon Apr 19, 2021 9:19 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico start warning
Replies: 2
Views: 92

Re: Pico start warning

wangshujun@tom.com wrote:
Sun Apr 18, 2021 1:56 pm
... other serial port tools can't access normally. The environment is ST's CDC driver used by winc7 system CDC driver
I haven't seen this using rshell or miniterm.
by pythoncoder
Mon Apr 19, 2021 9:11 am
Forum: General Discussion and Questions
Topic: ssd1306 0.96 oled font size
Replies: 1
Views: 54

Re: ssd1306 0.96 oled font size

The SSD1306 driver inherits from FrameBuffer, which means that arbitrary fonts may be rendered using the Writer class in font-to-py.

There is also a nano-gui which works with these displays.
by pythoncoder
Mon Apr 19, 2021 9:02 am
Forum: General Discussion and Questions
Topic: Why mp_type_framebuf is declared as STATIC?
Replies: 2
Views: 53

Re: Why mp_type_framebuf is declared as STATIC?

One thing to note is that (unlike other built-in classes) the FrameBuffer class is designed to be subclassed in Python. I don't know what this involves at the C level, but there may be implications in any attempt to change it.
by pythoncoder
Mon Apr 19, 2021 8:55 am
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 6
Views: 251

Re: How do you catch getaddrinfo() errors

Hi Dave, that link is for writers of C modules. Python error handling is simple and you seem to be doing it correctly. I can't see why the machine is freezing: what happens if you interrupt the program with ctrl-c? This should produce a traceback to show what it was doing when interrupted. There are...
by pythoncoder
Sun Apr 18, 2021 12:51 pm
Forum: ESP32 boards
Topic: LAN-Support with ESP-IDF 4
Replies: 1
Views: 99

Re: LAN-Support with ESP-IDF 4

A first step is to read the Contributor Guidelines and code conventions.
by pythoncoder
Sun Apr 18, 2021 12:46 pm
Forum: General Discussion and Questions
Topic: How do you catch getaddrinfo() errors
Replies: 6
Views: 251

Re: How do you catch getaddrinfo() errors

DNS queries can be expected sometimes to fail. The reason no error message is displayed is because you are trapping the resultant OSError and ignoring it. If you are always accessing the same IP address (or small set of addresses), you could do the DNS query/queries when the application starts (repe...