P5 glove-\>P5osc-\>Pd
I have usb device (non HID) that sends X, Y, Z (and more) signals via OSC messages that I'm reading in PD. I very much need to send it into [hid] library for re-routing to various axis, but cannot find a way to build a patch to take OSC > PD patch(?) > [hid]. Basically that takes [int] OSC messages, converts to a simulated HID device, then feeds into the [hid] library, then reroute using [hid] as normal.
Do you have any ideas or a patch that might work?! Any help would be much much appreciated... Thanks.
http://www.pdpatchrepo.info/hurleur/Screen_Shot_2014-05-09_at_14.54.01.png
P5 glove-\>P5osc-\>Pd
I have usb device (non HID) that sends X, Y, Z (and more) signals via OSC messages that I'm reading in PD. I very much need to send it into [hid] library for re-routing to various axis, but cannot find a way to build a patch to take OSC > PD patch(?) > [hid]. Basically that takes [int] OSC messages, converts to a simulated HID device, then feeds into the [hid] library, then reroute using [hid] as normal.
Do you have any ideas or a patch that might work?! Any help would be much much appreciated... Thanks.
http://www.pdpatchrepo.info/hurleur/Screen_Shot_2014-05-09_at_14.54.01.png
Ableton live to pure data to arduino
hi all,
I got a problem with...as the subject says: ableton to pure data to arduino.
My project is a robot band.
if anybody could help me ..
thank you
manu
Pduino-based multi-arduino wireless personal midi controller network
Saw your TED video, so maybe you've already solved this problem.
In my limited work with getting arduino and pd to play nice, I've found that things like pduino and firmata work great but can be restrictive. I had to multiplex inputs on my arduino, which doesn't play nice with something like firmata that automatically reads all the pin values.
It might be better to have each arduino on it's own [comport], and differentiate the arduinos that way. Dump pin values over each comport and keep reading it.
Here's the thread explaining what I did:
http://puredata.hurleur.com/sujet-5832-reading-multiplexed-input-streams-arduino
I'm a fan of your work.
Pure Data and Arduino
Hello,
Although there seems to be endless information on the internet on using an Arduino board with Pure-Data, I haven't found any info that will make it work for me... So, I'm seeking for some help.
So I'm trying to use my Arduino board to read galvanic skin response. I've got that nearly working. Where I'm having trouble is getting the data into PD in the correct format.
Here is the code I have for my Arduino:
// Arduino Code
int sensorPin = A0;
int sensorValue = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
float conductance = getVoltage(sensorPin);
Serial.println(conductance);
Serial.write(conductance);
delay(1000);
}
float getVoltage(int pin){
return (analogRead(pin));
}
// End Arduino Code.
I'm using the comport object in PD. And I am receiving Data which is analogous to what I'm doing on the board. But I can't understand exactly what it is reading. Here is the link to my PD patch: http://www.sendspace.com/file/n81jlj
So Firstly, the Numbers keep jumping around, and secondly I'm not sure what those numbers are. What I'd like them to be is the individual analog inputs of my Arduino. But they clearly aren't as they all change when I play around with my arduino board. Also they seem to range between 0 and 255, whereas my Arduino reads the data as 10bits...
Any sugestions!?
Thank you,
Niko.
Pd to arduino
hi there
I am trying to get video tracking info form vvvv to pd to arduino.
I want to control dc motors in an angle that is determined by the video tracking
so I managed to get the angle-info from vvvv to PD, now I want pd to transport it to my arduino but I cant get
clear how to do that. I am using the hansrudolfsteiner ( http://www.arduino.cc/playground/Interfacing/PD ) stuff but have a few questions.
-- i sent the data from vvvv to pd with the netsend/receive stuff, where do i connect that to a digital pin so the changing value gets transported to my arduino mega
--how can I read that digital pin so I can use it in my arduino program, do I really need to use the whole firmata patch? or can this be done easier? because I only need to read 1 pin... and I need my other pins for output
if somebody knows something about this, thanx in advance..
art
Pduino-based multi-arduino wireless personal midi controller network
I am trying to find out if and how to create an arduino fio/xbee based wireless network of multiple fio/xbee's? 4 to be exact.
I am currently building a wireless system consisting of 2 "hand units", a wireless mouth interface and a base station xbee interfacing with pure data. www.beatjazz.blogspot.com. i already have the first fio/xbee communicating with the base station and pure data using pduino and all is perfect. this weekend i pick up the other 2 arduinos and fio's. all 3 arduinos need to connect with the pure data at the same time.
the instrument i am building is a wind midi controller except that instead of it being one horn like instrument, allthe left hand keys are in a wireless unit attached to the left hand and same goes for the right hand. the mouthpiece is worn like a headset microphone and is a pressure transducer for breath and a FSR for lip pressure. they must all work together as if one instrument. most of the coding has been done, andnow is time to split that code to the multiple wireless nodes.
it would seem that since all the xbee's have their own id's that that would translate over to the arduinos they are connected with and the whole network should come into the computer thru one serial port, which should solve that problem. I am wondering; how i might interface the 3 arduinos to pure data/pduino? theoretically, shouldnt i be able to name instances of the [arduino] object, say [arduino left], [arduino right], and [arduino mouth] so that each fio has its own instance? if so, how do i recognize the individual fio's and make use of their individual id's if that is the case at all?
Thank you in advance for any insight anyone might share.
Onyx
Arduino, ultrasonics and Pd: HELP needed for degree project!
Dear Pd'ers… I'm fairly new to Pd and have been using it during my 'Audio Production' degree at SAE college in London. I'm here to ask for help on my final degree project, which aims to control objects within Pd by way of proximity sensors connected to Arduino.
I have had moderate success, first using a Sharp GPD12 IR sensor connected to an analog port on an Arduino Diecimila, then a Devantech SRF02 connected via I2C to Arduino. I have managed to get Pure Data reading the sensor values using the Pure Data example included in SimpleMessageSystem (http://www.arduino.cc/playground/uploads/Code/SimpleMessageSystem.zip)... and only altering the number of the comport the Arduino appears on.
On the Arduino end, I have added the SimpleMessageSystem library, and am using the following sketch to run one or both of the sensors depending on whether or not I omit the SRF02 or GPD12 parts of the code.
// top //
#include <Wire.h>
#include <Servo.h>
#include <SimpleMessageSystem.h>
int sensorPin = 0;
int sensorValue = 0;
Servo servo1;
#define sensorAddress 0x70
#define readInches 0x50
#define readCentimeters 0x51
#define readMicroseconds 0x52
#define resultRegister 0x02
void setup()
{
Wire.begin();
Serial.begin(9600);
}
void sendCommand (int address, int command) {
Wire.beginTransmission(address);
Wire.send(0x00);
Wire.send(command);
Wire.endTransmission();
}
void setRegister(int address, int thisRegister) {
Wire.beginTransmission(address);
Wire.send(thisRegister);
Wire.endTransmission();
}
int readData(int address, int numBytes) {
int result = 0;
Wire.requestFrom(address, numBytes);
while (Wire.available() < 2 );{
}
result = Wire.receive() * 256;
result = result + Wire.receive();
return result;
}
void loop()
{
// SRF02 READING //
sendCommand(sensorAddress, readInches);
delay(70);
setRegister(sensorAddress, resultRegister);
int sensorReading = readData(sensorAddress, 2);
Serial.println(sensorReading);
delay (200);
// GPD12 READING //
sensorValue = analogRead(sensorPin);
int range = (6787 / sensorValue);
Serial.println(range);
delay(200);
}
// bottom //
Pure data is picking up the sensor's output as a decimal number, through the serial port, correctly, and showing this as a number in the SPECIAL CHARACTER section of the Pd patch, which I can then use to control various Pd parameters, like a slider for example.
If printing both sensor readings to the serial, the Pd patch will pick up the two sensor values alternately, but there seems no way of differentiating the two sensors within Pd, as they both come through the serial. I have tried prepending the serial print at the Arduino stage with a tag such as "IR" or "UL" for each sensor, but this simply ends up in nothing coming through in Pd.
Using one sensor gives the ability to control parameters with a fairly narrow detection range, but for the final version I would like to incorporate 4 or 5 sensors in order that I can cover nearly a full 360 degree range.
After a bit of research I have gone and bought 4 x Maxsonar EZ0's. They've got a wider range than the Devantech sensors, and can operate via I2C, serial or PWM. A number of people online seem to mention the improved stability when operating via PWM, so I thought this could be kinda useful.
I am going to London Hackspace tomorrow to get help with wiring up the sensors to my Arduino Diecimila, but for now, my main problem seems to be how to achieve greater communication between Pure Data and the sensors. It's all very good and well being able to take the decimal readout from an analog input to give one set of values in Pd, but I would like to know how to either to read (and trigger) each sensor discretely via PWM, or to somehow differentiate between each sensor's analog output, so that I can have the different sensors controlling different objects within Pd.
As well as SimpleMessageSystem, I looked at using the Pduino object. But to be honest, it is either not working properly (I have noticed reported issues with bugginess), or I am being stupid, as it has totally boggled my brain. In theory though, it seems like it should be able to do what I want, ie. send and receive commands between Arduino and Pd.
****************************************
So…. my questions for anyone out there with a knowledge of using Arduino + multiple sensors (preferably Maxsonar EZ's) with Pd are:
What is most appropriate for my project?
- Simple Message System or Pduino?
- analog or PWM?
And how do I get proper communication between the two platforms so I can discern discrete values from each sensor?
I'd really like to get a discussion going with this as (a) it would really help me in my degree (which ends in about 4 weeks!!!) and (b) I really want to share what I am doing, especially as the discussions on Arduino/Pd communication on the various forums seem a little patchy (at least for noobs like me). I also hope to continue my research in the future, sharing any findings I make with the community…
****************************************
PS. In the sharing spirit, please check out the Radio Tuner patch I've just posted over on the patch section of this forum - it's my first successful attempt at Pd... I hope you enjoy
Arduino and PD\_multiple servos
hello everybody,
I'd like to control several servos with pure data and arduino. For the moment I'm able to control one servo with this simple arduino sketch:
#include <Servo.h>
Servo myservo1;
int incomingByte = 0; // for incoming serial data
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
myservo1.attach(3);
}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
myservo1.write(incomingByte);
}
}
in PD, the patch is a simple HSLIDER 0-->180 linked to the object comport 4 9600
I read on the net that to control multiple servos I need to write a communication protocol, ... I'm a noob and don't know how to do this, does anybody know how to?
thank you
manu
Bluetooth port problem using pd + arduino
Hello,
I've been using a Mac Mini running pd-extended and two arduino boards attached to it to control some electric motors of an installation. I use Pduino and the StandardFirmata uploaded into arduino and I had no problems until I decided to do a file transfer from my MacBook into this Mac Mini using Bluetooth. I opened the Setup Bluetooth Device, I chose to open a connection to my computer and did the file transfer.
Unfortunatelly, when I opened the patch I've been working for several months, one of the two arduino boards was not working. The comand
[open 2<
|
[arduino]
started to cause an error message saying the port I was using was no longer of my arduino but the tty.Bluetooth port related to my MacBook. I turned off the Bluetooth Devices of both computer but the tty port related to that bluetooth transfer is still in "the place of" my arduino usb tty port.
Then I tryed all the possibilities: [open 0<, [open 1< and [open 4< to try to find the right tty port. The [open 3< is already in use by the other arduino board which fortunatelly is still working. When i tryed [open 5< I received the message that I could only use more than four ports on .
Do anyone no how to manage these tty ports? Can I erase the tty port related to the bluetooth transfer? Will that cause my arduino tty port to come back to the list in which pure data can access?
I'm a bit scared because the installation will be exposed in two weeks!
Thank you very much for your attention.
Skrako.