Message Boards Message Boards

What is the meaning of the input value by "DeviceRead"?

Posted 3 years ago

First, thanks for read. I'm a math teacher in highschool.

If you connect Arduino Uno to Mathematica and press the switch, the value read by DeviceRead is changed to '0' or '1'.

When the switch is pressed using the EmitSound, Sound, and SoundNote functions, the sound corresponding to '1' is output.

And in the end, I want to make an 88-key piano.

However, an error code appears stating that the value of '0' or '1' output by

v=Dynamic[DeviceRead["Arduino",11]]

is not applicable in

EmitSound[Sound[SoundNote[v]]].

What am I missing?

If there is a difference in time that occurs from the moment the switch is pressed and connected to the EmitSound function of Mathematica through the Arduino, how can we overcome it?

Thanks, again.

Attachments:
POSTED BY: wkdrpqkfk Jang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract