Skip to content

Simplifies catching keyboard interrupt #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Simplifies catching keyboard interrupt #9

merged 3 commits into from
Mar 8, 2024

Conversation

sebromero
Copy link
Collaborator

This PR simplifies the process of catching the keyboard interrupt error reducing overhead.
Also it adds the option of running the loop non-blocking without delay. To do so the NON_BLOCKING property has to be set to True:

from arduino import *

arduino.NON_BLOCKING = True

def setup():
  print('setup test')

def loop():
  print('loop test')

def cleanup():
  print('cleanup test')

start(setup, loop, cleanup)

@sebromero sebromero requested a review from ubidefeo March 8, 2024 11:58
ubidefeo

This comment was marked as outdated.

Copy link
Contributor

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

Too fast:
please change the PR towards dev

@sebromero sebromero changed the base branch from main to dev March 8, 2024 12:27
Copy link
Contributor

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

Merging

@ubidefeo ubidefeo merged commit 8b7fc54 into dev Mar 8, 2024
@sebromero sebromero deleted the simplified-catch branch March 11, 2024 13:09
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.

2 participants