Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: Arduino, Prosessing and Theremin on: May 05, 2011, 09:36:02 am
First af all, I got an error because of files, but when I put them into sketch folder, any error was shown.

So I've downloaded the files and I renamed them and, later, I put them into sketch folder (ctrl+k).


Thanks you for your reply!
2  Using Arduino / Programming Questions / Re: Arduino, Prosessing and Theremin on: May 05, 2011, 08:49:47 am
Hi!

Thanks you for reply!

Sorry for my explaination... my English is not good enough...  smiley-lol

I mean:


2 errors were shown:

Code:
=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2

First, I could solve the second one by downloading some RXTX files.

But, the first one ("Likely buffer underrun in AudioOutput" ) is the one I cannot fix.


Currently I'm running Windows 7
3  International / Español / Re: Arduino, Prosessing y Theremin on: May 05, 2011, 05:12:33 am
En el foro inglés han respondido esto:

Quote
perhaps the wav files you are using are too large to be stored in the buffer when using the "AudioSample" function of the Minim library.  Some of the functions have file size limits, particularly if they are they intended for short snippets of sound.  Check the support for the Minim library here: http://code.compartmental.net/tools/minim/


Yo he estado mirando la documentación, pero según he visto, esta función debe servir para sonidos cortos, por lo que no sé por qué no funciona.

Si alguien tiene cualquier idea, le agradecería enormemente su ayuda smiley


Un saludo a todos!
4  Using Arduino / Programming Questions / Re: Arduino, Prosessing and Theremin on: May 05, 2011, 04:39:20 am
Thanks you for your reply!

But... the music files I trying to put are very shorts, about one or two seconds (they are only piano notes: A, B, C...).
That's the reason of thinking it isn't the problem.
I've just read the documentation of minim and it says:
AudioSample can be thought of like a sample in a drum machine. It is meant to be used for short sounds that simply need to be triggered and then forgotten about

I don't know why does the code fails...

Help!  smiley-grin
5  International / Español / Arduino, Prosessing y Theremin on: May 04, 2011, 09:17:16 am
Hola a todos!

Tengo el siguiente problemilla: estoy intentando construit un Theremin con Arduino. Conectándole un altavoz y un sensor de ultrasonidos, va perfecto.
El fallo viene cuando quiero conectarlo con Processing para que se le asigne un sonido determinado a cada posición.
He puesto los archivos de sonido en la carpeta del proyecto y he puesto el puerto COM correcto.

La consola muestra esto:

The error the console shows:
Code:
=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
[0] "COM3"

El código que estoy usando es este:http://luckylarry.co.uk/arduino-projects/arduino-basic-theremin-meets-processing/



EDITO: acabo de corregir esta parte del error:


    
Code:
WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2

He descargado unos archivos de JAVA  aquí y ya está: http://rxtx.qbang.org/pub/rxtx/


Pero lo otro no se ha solucionado.


¿Alguna idea?
6  Using Arduino / Programming Questions / Re: Arduino, Prosessing and Theremin on: May 04, 2011, 09:09:13 am
I've just fixed the error:

Code:
WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2

I've downloaded java source files here: http://rxtx.qbang.org/pub/rxtx/ and the error has disappeared.

The problem is the another error yet... smiley-sad

Someone can help me?
7  Using Arduino / Programming Questions / Arduino, Prosessing and Theremin on: May 04, 2011, 07:53:22 am
Hi everyone!

In my previous post I was trying to conect an ultranonic sensor, currently, it's working smiley-wink

But, now, my problem is:

I'm trying to conect Processing with Arduino, I wanna play musical notes with it.

First, I've installed the library "minim" into Processing libraries folder. Then I've put the notes (wav files) into Sketch folder and, also, I've put my COM port.

The error the console shows:
Code:
=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

=== Minim Error ===
=== Likely buffer underrun in AudioOutput.

WARNING:  RXTX Version mismatch
Jar version = RXTX-2.2pre1
native lib Version = RXTX-2.2pre2
[0] "COM3"


The code I'm putting: http://luckylarry.co.uk/arduino-projects/arduino-basic-theremin-meets-processing/


What could be the problem?



Thanks you so much!
8  International / Español / Re: Duda-Sensor de ultrasonidos on: May 02, 2011, 05:31:21 am
Lo primero, muchas gracias a todos por ayudarme smiley-wink

Después, al ver que con sensores de ultrasonidos independientes esto no va, (además en Ebay tardan demasiado, lo necesito para esta semana...) estaba yo pensando hacer el Theremin con sensores IR

Rebuscando un poco por mi casa he encontrado varios leds IR y dos receptores IR (como este: http://es.farnell.com/vishay/tsop4838/ir-receiver-38khz/dp/4913190)

¿Podría funcionar con esto?

¿Sería posible seguir este tutorial con los sensores que tengo?

http://mechomaniac.com/SimpleArduinoTheremin




Muchas gracias a todos otra vez smiley-wink
9  Using Arduino / Sensors / Re: Doubt-Ultrasonic sensor on: May 02, 2011, 05:27:42 am
Thanks you so much! I'm really pleased smiley

If that sensors are not valid, I'll try to look for another way to complete the project:

I was thinking about a IR led and and IR receiver (like that: http://es.farnell.com/vishay/tsop4838/ir-receiver-38khz/dp/4913190)

Could it work?

Can I build the theremin such as this one with my IR led and IR receiver?: http://mechomaniac.com/SimpleArduinoTheremin


Thanks you again smiley-wink
10  International / Español / Re: Duda-Sensor de ultrasonidos on: May 01, 2011, 05:31:00 am
Por si a alguien le sirve, en el foro inglés me han respondido esto:

cr0sh
Quote
The sensors (image) you've posted are of the raw ultrasonic transmitter and receiver transducers; an ultrasonic sensor (like the SRF05) consists of more than just those two parts - there are extra parts like amplifiers and such to drive the transducers. So tell us: Are you attempting to use "bare" sensors components, or do you have a complete ultrasonic module like the SRF05 (just one with three pins versus four)?

If the former, then you'll have a lot of extra work to do to get them to work (you can't just "hook them up" - there's a bunch of external circuitry involved); if the latter, then telling us what sensor module you have will be helpful.

Básicamente, que no se pueden usar los sensores por separado...

Buscaré algún otro proyecto para presentarlo smiley-sad


Muchas gracias a todos
11  Using Arduino / Sensors / Re: Doubt-Ultrasonic sensor on: April 30, 2011, 02:17:07 pm
Thank you for your reply smiley

1- Yes, I mean output... (my English smiley-lol  )

The sensors are, more or less:




The project I'm following: http://luckylarry.co.uk/arduino-projects/arduino-a-basic-theremin/




The code:


Code:
// written at: luckylarry.co.uk
// very easy Theremin
// setup pins and variables for SRF05 sonar device
int echoPin = 2;                                // SRF05 echo pin (digital 2)
int initPin = 3;                                // SRF05 trigger pin (digital 3)
int speakerPin = 6;                             // Speaker pin
unsigned long pulseTime = 0;                    // stores the pulse in Micro Seconds
unsigned long distance = 0;                     // variable for storing the distance (cm) we'll use distance as a switch for the speaker
unsigned long soundDelay = 0;                   // variable for storing the deay needed for the pitch
//setup
void setup() {
  pinMode(speakerPin, OUTPUT);                  // sets pin 6 as output
  pinMode(initPin, OUTPUT);                     // set init pin 3 as output
  pinMode(echoPin, INPUT);                      // set echo pin 2 as input
 }
// execute
void loop() {
  digitalWrite(initPin, HIGH);                  // send 10 microsecond pulse
  delayMicroseconds(10);                        // wait 10 microseconds before turning off
  digitalWrite(initPin, LOW);                   // stop sending the pulse
  pulseTime = pulseIn(echoPin, HIGH);           // Look for a return pulse, it should be high as the pulse goes low-high-low
  distance = pulseTime/58;                      // convert the pulse into distance (cm)
  soundDelay = pulseTime/3;                     // alter this variable to alter the pitch of the sound emitted
  // make the sound.
  // check the distance, if over 30cm make no sound
  if (distance < 30) {
  digitalWrite(speakerPin, HIGH);
  delayMicroseconds(soundDelay);
  digitalWrite(speakerPin, LOW);
  delayMicroseconds(soundDelay);
  }
}


Sorry, I've just post it into Spanish forum, but, when I was translating, I forgot put the pictures.
12  Using Arduino / Sensors / Doubt-Ultrasonic sensor on: April 30, 2011, 02:06:31 pm
The problem is that the SRF05 have 4 exits: 5V, GRN, 2 to digital pins.

I don't know hot to conect my sensors so that they have same number of exits.

The only thing I could do is that it have 3 exits, making that:


That was my problem, how to do my sensors have 4 exits or how can I adapt the code for 3 exits?

Thanks you so much!



One more thing: sorry for my very bad English and for my electronic knowledge  smiley-lol


Yours sincerely,


Antonio
13  International / Español / Duda-Sensor de ultrasonidos on: April 30, 2011, 01:48:38 pm
¡Hola a todos!

Este es mi primer mensaje aquí. Personalmente, no me gusta registrarme y que mi primer mensaje sea para pedir algo, pero es que necesito vuestra ayuda. Además corre algo de prisa, puesto que es un proyecto que nos acaban de encargar para la semana que viene.

A modo de presentación, deciros que soy un estudiante de 2º Bachillerato (científico, of course  smiley-lol) que se acaba de iniciar con esto de Arduino. Lo único que he conseguido es hacer funcionar los códigos de ejemplo con leds smiley-sad


Resulta que estoy intentando construir un Theremin casero (http://luckylarry.co.uk/arduino-projects/arduino-a-basic-theremin/). Tengo todos los componentes, pero, el sensor de ultrasonidos no es como el que se emplean en los tutoriales que estoy viendo.


En casi todos se usa un SRF05, pero donde vivo sólo disponen del transmisor y el receptor independientes.


El problema es que el SRF05 tiene 4 salidas: 5V, GRN, 2 para digital pins.

Con los sensores por separados, no sé como conectaros entre sí para tener las mismas salidas que arriba.
Lo que sí he conseguido es que tenga 3 salidas, pudiendo realizar así esto:


Pues ése es el problema, ¿cómo hacer que tengan 4 salidas mis sensores o cómo adaptar el código para 3 entradas?


Muchísimas gracias a todos por vuestra colaboración y sobre todo, perdonad las molestias que os pueda causar.



Les saluda cordialmente,



Antonio
Pages: [1]