Hi everyone,
i'm working on a project wich requiers us to read 30 analoge inputs.
Besides reading we are also using PWM to control 10 separate LEDs, to accomplish this, we are using Maxuino v009.
We came across multiplexing, but we haven't been able to figure out how to get the data in MaxMSP through Maxuino.
This is what we found:
Unfortunately this example doesn't use Maxuino.. and it doesn't work with us at all (with or without maxuino).
So basicly, we don't really have to use Maxuino to read the inputs, as long as we can get the data in MaxMSP (we can always use a seperate arduino to control the LEDs (with maxuino))
Any help in the right direction would be fantastic.
Greetings from Holland
Maxuino isn't anything special really. It's just an abstraction that is supposed to make things easier for you. But really, you don't need it to use Arduino's data in Max/MSP. Like all abstractions, if you're going to do something that it doesn't do naturally, it's best to throw it out!
Open maxuino.maxpat to see what's really going on. At the heart you have the serial object and that is all you really need as Arduino sends its data through the serial input. So, having a qmetro bang that serial object 1000 times a second will output the data for you. You'll notice the "js maxino.js" objects before and after the serial object. The one before just prepares the data for the serial object, and the one after prepares the output for max. If you open this javascript file by double-clicking on "js maxuino.js", you'll find the following function near the end "analogCode". This is what prepares the analog readings.
So, this is what you should do"
1 - Printout the output directly after the serial object. This will show you what type of data you are getting.
2 - Modify the analog out function in that javascript file (or create a new javascript file called mymaxuino.js so you don't override the original) so that it outputs what you want.
The rest of Maxuino's stuff is just interface objects that let you interact easily with the javascript script.
To tell you the truth, I don't really use Maxuino anymore. I just took what I needed from it and made my own little abstraction. You should do that for your project.