Belay with STM32/Pyboard from Windows 10 PC #12501
Unanswered
rwaynecollins
asked this question in
STM32 / Pyboard
Replies: 1 comment 2 replies
-
You may try |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to get Belay working in python on Windows 10. I Just discovered "Belay" yesterday and it seems to be able to do what I need, but I can't get it to work. I can't get the initial Device/Port assignment to work.
I have my STM32F405 pyboard connected to a usb port on my Windows 10 PC and it shows up as "USB Serial Device (COM9)". My problem is I cannot get the device assignment to work without errors. I think the problem is I am not specifying the port properly.
Examples show the assignment as follows
device = belay.Device("/dev/ttyUSB0")
but it does not work, I get "ConnectionFailedError"
I have tried different variations of the port specification lile "/dev/ttyUSB9", "COM9", etc. but nothing works.
Any advice on how to get this connection to work in Windows 10 using python and "micropython on the pyboard" ?
Example program I am working with:
-- coding: utf-8 --
"""
Created on Thu Sep 21 16:00:09 2023
@author: wcollins
"""
import belay
device = belay.Device("/dev/ttyUSB0")
print("Device Assigned....")
@device.task
def set_led(state):
print(f"Printing from device; turning LED to {state}.")
Pin(25, Pin.OUT).value(state)
set_led(True)
Thanks in advance
Wayne
Beta Was this translation helpful? Give feedback.
All reactions