Skip to content

Update main.py#11

Open
ab-10 wants to merge 1 commit into
masterfrom
bugs
Open

Update main.py#11
ab-10 wants to merge 1 commit into
masterfrom
bugs

Conversation

@ab-10

@ab-10 ab-10 commented Nov 13, 2024

Copy link
Copy Markdown
Owner

No description provided.

Comment thread main/main.py
timeout=1
):
global port
port = serial.Serial(port_val, timeout=timeout)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'port' variable defined in 'init' is local and does not affect the global 'port'. To use the global 'port' within 'init', it should be declared with 'global port'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant