Search found 2 matches

by tenspot
Mon Nov 15, 2021 5:14 pm
Forum: General Discussion and Questions
Topic: how to get data through REPL port in program?
Replies: 6
Views: 4562

Re: how to get data through REPL port in program?

Hi, I was about to ask the same question re serial comms using usb, so thank you to Roberthh for your answer. @mmpy1st: Would it be possible to see an example of how to run this code in a thread? Also, is it possible to generate an interrupt when serial data is received over usb? Sorry if these seem...
by tenspot
Sun May 14, 2017 12:41 pm
Forum: General Discussion and Questions
Topic: Local static variables
Replies: 2
Views: 5398

Local static variables

Hi, I am trying to create a local static variable in a function that will be used as a callback. I have tried the following code, which I know works in Python 2.7 and above, but won't work in MicroPython as it does not support user-defined attributes. def foo(): if not hasattr(foo, "counter"): print...