Micropython Display To Pc Screen
Re: Micropython Display To Pc Screen
@Zcannon78 It seems that they pyboard requires a firmware update. In older firmware version, the module was called uos. In newer versions, you can both use os and uos.
Re: Micropython Display To Pc Screen
What I ended up doing was using a TTL USB/UART module and connected the UART pins on the pyboard to the module. I then used the Pyserial library on my Pc to send encoded messages to UART(1) (COM4/TTL module), which were decoded by the Pyboard and vice versa. In the end I was able to have my tkinter program send and recieve data and change the state of the pyboard. I’m not sure if it was the best way to do it, but it works.
Last edited by Zcannon78 on Mon May 09, 2022 9:02 pm, edited 2 times in total.
Re: Micropython Display To Pc Screen
I don’t think that would be the case. I updated my pyboard a few days ago and the os command worked previously.
Re: Micropython Display To Pc Screen
@Zcannon78 if you reset the pyboard you need to import os module before calling@cgglzpy I tried out the upydevice library but my experience was inconsistent. I have been able to turn on and off the built-in leds and read the directories once. After I had uploaded different programs to the pyboard, the upydevice program stopped communicating with the pyboard and I had to reset. When I factory reset the pyboard, I tried to read the directory files again and it gave me the error NameError: name 'os' isn't defined. Although I could still turn on and off the leds.
Code: Select all
os.listdir()
So you need to add
Code: Select all
import os
Code: Select all
import os; os.listdir()
as @RSC Games said a while loop will block the REPL which is necessary for upydevice to work. You can break the while loop sending a keyboard interrupt/ CTRL-C character with e.g.I had uploaded different programs to the pyboard, the upydevice program stopped communicating with the pyboard and I had to reset
Code: Select all
device.kbi()
-
- Posts: 61
- Joined: Fri Feb 15, 2019 9:22 am
Re: Micropython Display To Pc Screen
You can take a look at the implementation of openmv, which contains the code to display the internal cache to the IDE. Openmv is an extended implementation of micro python, which should be more promising for transplantation