Arduino to Max MSP Question

Hi, sorry if this is a newbie question.

I’m creating a weather sonification project for my Masters Dissertation. I’m using a weather data input stream to control a sound generation system in Max MSP.

I’ve got an Arduino Uno and Sparkfun Weather Shield. I have it hooked up with the additional weather meters (to get wind direction/wind speed and rain). When I load the Arduino software and load in a Weathershield Sketch (weather_station_example) it gathers all the data like humidity, temp, wind speed and direction, light etc. so I know I’ve soldered the pins correctly and its working.

I want to get this data into Max MSP so Ive been using the arduino2max patch and the StandardFirmata sketch in Arduino 1.0.5. It reads the analog and digital pins ok. The problem that I have is that the wind speed and rain are on the digital pins so i’m just getting just a 0 or a 1, obviously a binary number.

I really need the wind speed, rain displaying a large number so I can use that to control a sound parameter etc. Can you think of a way to do this? I have tried almost everything I can think of and I can’t find any help searching on these forums. can I route these sensors to the spare analog inputs on the uno? I’m struggling to understand how the weather shield sketch can grab all the data and represent it using the weather_station_example but in Max, I’m only seeing those binary values as mentioned above.

When I use the Maxuino patch, I get the analog pin data and the digital pin data.

also, I can’t see the humidity and temp data in the arduino2max or the maxuino patch.

Any help in this matter would be very much appreciated and I thank you for your time in advance.

Warm Regards, Elliot

The problem that I have is that the wind speed and rain are on the digital pins so i’m just getting just a 0 or a 1, obviously a binary number.

Which digital pins? What are they supposed to do to those digital pins?

It sounds to me like they are supposed to trigger interrupt service routines to count events.

I’m creating a weather sonification project for my Masters Dissertation....and the StandardFirmata sketch

These are not going to go together in your final code.

I recommend not using the Maxuino or other Max libraries for this applicatoin. You can just send data to max via serial. You have to parse the serial data in Max and there are many ways to do this, below is one. Please let us know if you have a website for your project/research.

Arduino:
void loop () {
// for the DHT temperature sensor
float h = dht.readHumidity();
Serial.print("/Humidity/");
Serial.println(h);
delay(2000);
}

Max:


----------begin_max5_patcher----------
712.3ocyWF0bhBCDG+Y7SQFd1SABI.2S2818c3lNchZTSOHgII1ydc528KIH
sVanZQkwWPyxBY2e4e1r77nfvYhsTUH36feCBBddTPfyj0PvtwAgUjsyKIJm
agb5eEydHbbyszzsZmYEX8lJ1hV6l+YsZ77aYEsFWJ3ZNoh5t0OkLRY6c3lm
kWR0toHdO2Ur+4bONYRza9J1nact0ZMQOeMiu5dIcttIeRhMOCn.ir+ff1qI
QSh.2YehWFMxdY7Il0UTkhrh9gz9W1jloexSdiQGOuaRD8S0zlPNLDbmOjj7
UPRb2HIuXBp.hvYFt.ysDAisWiy6IW5PMrgWSl+GfBrzCXP39.lwfvkkBhtC
B4Uz.6fPIehnAldHhxhbRm3KKhVJEUpmplIJA+PQqIRhVHAS8vqzKnPJ9BIj
dGlhb6vhSQm0VLsX0pRpm7O40BHVJUQ0T48TNYVIc+B.ef.L9wzJ8JayRdMM
uB0SpERMvGDvQ2dUSfY4ugEjCKowmU4jtvxz15rSMhr3HeEUxt83Swj7zF5j
WfljUTjByMaWRuFUbYZAwGV5Ssit24.uBkOxwtsRo3yZCUGXQuVRUqAvHeZl
T7sml4cjAhljrS0fytd0al4iMvav5MFdbYq2zgpwbFiTXfsOQCrOhlYD9pAT
3rCNXz0XKkhZSU.0zYse.k0yRNi+ZcsblM2kk6ZtKG4s4NWbDVx3G9wQt2p0
96AmRrQNuMYZaZCD8Z5rfpzLNQyD78bx1I7dNslsXAkueSMKXJaeNN3F4cI7
TimClJ+wi8SV.wCW7Dej3w9oiCDer8WcT9Xk1C050IoexFt0qSIdNPzeMimz
SQOiFv3AdaoeNXp5X8Z3p+.w2V7Io3Thm9xmliOH00ORkpcuSWnXNg8AgzND
O1MjwaF5NhKTRej05uqW6PhzbHl1bB1FYy4naywgiryyKi9Ogc.gkB
-----------end_max5_patcher-----------