Go Down

Topic: StandardFirmata/Maxuino code + pulse code at the same time - Possible? (Read 2 times) previous topic - next topic

mkloppers

I am using an SB-Freeduino v2.2, Max 5, Maxuino/Standard Firmata.

What I want to know is, can I upload an additional code besides StandardFimata/Maxuino, and load both into the arduino and have both codes operate and complete its function at the same time?

For example, if I have several temp sensors, two servos and other functions being performed by Max MSP through the arduino (Freeduino), but I also want to have code that takes square wave pulses, smoothes them out etc and measures the time between the pulses, and displays the time in ms. Then just send the actual resulting time increments to Max MSP?

Maxuino cannot interpret interrupts, so I want to complete the math and derive the final time increments (essentially have the pulse frequency in ms) and just send the final numbers to Max MSP?

I hope I am explaining this clearly enough. I am a Max guy, but have not spent much time with arduino coding by itself... just relied on Max to work in.

-Martin

PaulS

Quote
What I want to know is, can I upload an additional code besides StandardFimata/Maxuino, and load both into the arduino and have both codes operate and complete its function at the same time?

No. One sketch at a time.

mkloppers

If I were to use an additional microcontroller, I could run upload the code that interprets the signal and converts it into a real-time hertz value that is available as a byte. Then from this second microcontroller, can I run this hertz value/byte into my arduino#1 (one of its inputs) so that that value can be fed into Max MSP via Maxuino?


PaulS

Quote
If I were to use an additional microcontroller, I could run upload the code that interprets the signal and converts it into a real-time hertz value that is available as a byte. Then from this second microcontroller, can I run this hertz value/byte into my arduino#1 (one of its inputs) so that that value can be fed into Max MSP via Maxuino?

Yes.

mkloppers

Ok, I will keep that in mind as an option.

How will that hertz value/byte register in the arduino#1 inputs? This is probably a dumb question... but do I need 8 inputs to register  a byte? And I would have to be able to get it into Max MSP via Maxuino...

Go Up