arduino meets touch!

Hi! Im trying to connect arduino with touch directly, without any other program disturbing around. What I need is a serial port operator, that goes in double sense. I tried to use CHOP serial and it sees the arduino but doesn’t receive anything. So, im thinking, am I missing something? or can I program it to traduce the ascii messages?
or perhaps perhaps… can you make it for me? :unamused:

thanks for reading!!! Caro :open_mouth: :slight_smile:

Hi Caro.

We’ve done some interfacing with an Arduino very recently.

The serial CHOP does receive messages, but it only accepts ascii digits in return.
So for example if the Arduino reported back ‘1’ ‘3’ ‘5’ ‘\n’ Then the CHOP channel
would hold a value of 135.

We’ve also recently added a Serial DAT which can be used to receive and send any type of
data and operates in a separate thread, so its a little more useful.
The DAT is pretty new, so it could benefit from some more testing on our side.

Cheers
Rob.

Hello!
We write u (me and carotravi) after a great weekend of workshop with Arduino.

Finally we found a good way to send and receive Datas from Arduino to Touch, waiting for the Serial DAT which is not avaible at the moment .

Using a CHOP OSCin/out and a script of Processing which translate the OscMessages in ascii messages, we started to control 5 LEDs from Touch, and to control a little visual using a lightsensor (or photo resistance).
Everythings works fine without crashing!
but…
Datas from Arduino to Touch are in real-time, and datas from Touch to Arduino have a delay of 8 seconds (at the moment we don’t know how to fix it).

We built up in processing (with the help of Massimo Banzi) a patch who recognize the number of the Pin from the string of the channel’s name, so we have 14 Analogwrite which are written like this:
/AnalogWrite/0 “value”
/AnalogWrite/1 “value”
/AnalogWrite/2 "value

and 6 AnalogRead which are written like this:
/AnalogRead/0 “value”
/AnalogRead/1 “value”
/AnalogRead/2 “value”

Backslashes divide strings from numbers so we can use the single number as an integer and send it to the right Pin!

What u need is:

How to:

- Install Arduino software

  • connect your Arduino to an UsbPort and Open the software
  • select the right COM Port from…
  • go to sketchbook, find Firmata Standard and open it
  • upload the FirmataStandard on your Arduino

- Install Processing

  • add the 2 libraries (OSCP5, Ard2Pro) inside the folder of processing/libraries
  • open the file of processing we attached in this post
  • play —> you will have a little window with changing values

Open Touch with the example file we attached in this post.

  • you will be able to send and receive values!!! :smiley:

If you want to connect more LEDs…

In this photo you can see how to attach a light sensor
here there is also an output to a little motor:

We know that this is NOT the best way to connect Touch with Arduino… but works fine :slight_smile:

…waiting for TOUCHUINO…

For every questions please reply to this post! We’d be glad to answer!

…video caleidoscopic avaible soon…

CIAO !!!

Nima & Caro

good to hear it’s working!

There might be another option. Not sure if the following works good (or at all), but to me it sounds that this arduino libary
recotana.com/recotanablog/?page_id=222
makes an arduino directly understand OSC

Just a shot in the dark, but maybe it’s helpfull to get better/faster communication

What hardware are you building by the way?
cheers
Akeem

Hi Nima + Caro.
Thats a great solution you find to communicate with Touch.
Love the pictures.

There is also an OSC In DAT which gives you a more direct route back from the OSC link.
As for the outgoing delay, does the whole interface lock up / stop for this time,
or does the data just appear suddenly?

Rob