3
\$\begingroup\$

I've been trying to find ways to pass a variable from my Arduino code into PureData in real-time. I've explored PDuino and the Firmata library, but the tools seemed a bit more for reading and controlling pins. Maybe I glanced over how do get variable data.

If you have done something like this, could you briefly explain the process being utilized here? I don't fully understand the connections being made or how Firmata is mediating things. If you have a suggestion for a library or simple code, please let me know.

Chetan Bhargava
4,6325 gold badges29 silver badges40 bronze badges
asked Feb 14, 2014 at 2:31
\$\endgroup\$
2
  • 1
    \$\begingroup\$ Is there any electrical engineering aspect in this question? \$\endgroup\$ Commented Feb 14, 2014 at 9:24
  • 1
    \$\begingroup\$ This question appears to be off-topic because it is about programming. StackOverflow would be a better place for it. \$\endgroup\$ Commented Feb 14, 2014 at 12:23

1 Answer 1

3
\$\begingroup\$

I don't fully understand the connections being made or how Firmata is mediating things.

It seems to me that the Firmata sketch makes your arduino into a dumb peripheral of your PC.

If I am right, when running Firmata, you don't have other code running on the Arduino. Therefore you don't have any variables in an Arduino sketch that you need access to.

The Firmata library and Firmata sketch handle the communications for you. You only interface with the library on your PC

You do all the processing you want to do in your PC using a language with a Firmata library.

pass a variable from my Arduino code into PureData in real-time

In this case, you are writing two programs, a sketch that runs on an Arduino and a PureData program that runs on a PC. You want the two programs to communicate in real-time.

Use an appropriate communications method. If your PureData program is running on a PC and the PC is connected to the Arduino by a USB cable, you can use serial communications. The Arduino has a serial library and I would hope PureData has a way of reading and writing to COM ports.

The PureData community ought to (and probably do?) have a support forum with example code for this sort of task.

answered Feb 14, 2014 at 11:02
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.