Skip to content

Sending multiple serial functions concurrently. #33

Answered by MrYsLab
Delta0001 asked this question in Q&A
Discussion options

You must be logged in to vote

I may be misunderstanding the intent of the code, so let me state what I believe it is doing. Please correct me if I am misunderstanding.

  1. Pin 12 is being established as an input pin:
loop.run_until_complete(digital_in(board, DIGITAL_PIN))
  1. The blink function sets pin12 as an output and then toggles pin12 four times.

A digital pin can be either an input or an output, but not both simultaneously. The digital_in function establishes the pin as an input, then blink sets it as an output.

I am not sure why you are getting callbacks at all since Telemetrix4Arduino triggers off of the pin's current mode. Only if the pin is a digital input (which it no longer is), can a report be generated.

Pl…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Delta0001
Comment options

Answer selected by Delta0001
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants