1

I've just got my hands on an Arduino and have started having a little play with it. I've followed this tutorial and managed to get that simple patch working. I've modified the PD patch a little to trigger the LED on port 9 when a bang connected to a kick drum is hit:

photo1

This works, but I've now hit a road block. I'd like 1 bang (Kick) to trigger 1 LED on port 9 as it is at the moment, but I'd also like another bang, connected to a snare to trigger another LED on port 8. I've absolutely no idea how to do this. I'm sure it's not too hard but I'm very inexperienced with coding. I've given it a go at writing the code but it's not working and I'm not sure what more I need to add to PD.

Here's what I've tried to do:

photo2

But it doesn't work.

Please please can someone help me out here?

Thanking you :)

Simon MᶜKenzie
  • 8,344
  • 13
  • 50
  • 77
  • Those image links doesn't seem to work. use Stackoverflow's built-in image-button or rehost it to a proper host like Imgur.com and use `url`. – timss Apr 22 '13 at 00:14
  • 1
    I've fixed your tutorial hyperlink, but the image links are broken. Please make sure they're publicly accessible. – Simon MᶜKenzie Apr 22 '13 at 00:28
  • rather than providing (nonworking) links to screenshots of code, it would be great if you could provide (working) links to the actual code (patches), or try writing down the patches as ASCII-art. – umläute Apr 22 '13 at 12:24

1 Answers1

1

In the tutorial you reference you write a custom Arduino sketch for what you want to do in the Pd patch. The alternative method would be to upload a kind of a firmware sketch to the Ardunio which turns the Arduino in a versatile interface. Then you can set the digital ports to in, out or PWM as you like. Someone has done that for you and it's called Firmata. Firmata is included with Arduino, you'll find it in the examples. Upload the standard Firmata to your Arduino and then use the Arduino object in Pd to control it.

Max N
  • 1,134
  • 11
  • 23