uControl
Mayo 21, 2013, 04:59:09 *
Bienvenido(a), Visitante. Por favor, ingresa o regístrate.
¿Perdiste tu email de activación?

Ingresar con nombre de usuario, contraseña y duración de la sesión
 
   Inicio   Ayuda Buscar Ingresar Registrarse  
Páginas: [1]   Ir Abajo
  Imprimir  
Autor Tema: Arduino + Processing  (Leído 8872 veces)
0 Usuarios y 1 Visitante están viendo este tema.
CesarS
Moderator
PIC12F
***
Desconectado Desconectado

Sexo: Masculino
Mensajes: 139



« : Diciembre 05, 2008, 01:34:58 »

Buenas, abro este tema para quien le interese comunicar el Arduino con una interface Software utilizando Processing

Link 
Processing(Descarga)

Arduino + Processing

Varios ejemplos



Saludos
« Última modificación: Diciembre 05, 2008, 05:49:28 por CesarS » En línea
gcastillo
PIC10F
*
Desconectado Desconectado

Mensajes: 2


« Respuesta #1 : Noviembre 12, 2009, 07:24:46 »

buenas maestro , tengo una consulta aver si me podes ayudar,

que cosas cambiaron en el ultimo arduino y el processing
que no deja copilar los archivos que estan en los ejemplos y aparecen estos errores


pa_PushButton.pde contains unrecognized characters.
If this code was created with an older version of Processing,
you may need to use Tools -> Fix Encoding & Reload to update
the sketch to use UTF-8 encoding. If not, you may need to
delete the bad characters to get rid of this warning.



el fix tools no aregla nada
te paso el codigo es el del Pushbutton de ARDUINO meets PROCESSING http://webzone.k3.mah.se/projects/arduino-workshop/projects/arduino_meets_processing/instructions/pushbutton.html

aver si me podes decir que cosas cambiar



/*
*  ap_ReadDigital

*  Reads an digital input from the input pin and sends the value
*  followed by a line break over the serial port.
*
*  This file is part of the Arduino meets Processing Project.
*  For more information visit http://www.arduino.cc.
*
*  copyleft 2005 by Melvin Ochsmann for Malmš University
*
*/


// variables for input pin and control LED
  int digitalInput = 7;
  int LEDpin = 13;
 
// variable to store the value
  int value = 0;
 
void setup(){

// declaration pin modes
  pinMode(digitalInput, INPUT);
  pinMode(LEDpin, OUTPUT);
 
// begin sending over serial port
  beginSerial(9600);
}

void loop(){
// read the value on digital input
  value = digitalRead(digitalInput);

// write this value to the control LED pin
digitalWrite(LEDpin, value);

// if value is high then send the letter 'H' else send 'L' for low
if (value)  serialWrite('H');   
            else
            serialWrite('L');
 
 // wait a bit to not overload the port
  delay(10);   
}




saludo
En línea
CesarS
Moderator
PIC12F
***
Desconectado Desconectado

Sexo: Masculino
Mensajes: 139



« Respuesta #2 : Noviembre 15, 2009, 12:27:41 »

Hola gcastillo , algo similar encontré en versiones anteriores, al cambiar de la 10 a la 11 por ejemplo
Ahora estoy un poco alejado del tema por cuestiones de trabajo,en los próximos días haré lugar para revisar el código.

Ni bien tenga una respuesta al problema te daré una mano.

Saludos

En línea
CesarS
Moderator
PIC12F
***
Desconectado Desconectado

Sexo: Masculino
Mensajes: 139



« Respuesta #3 : Noviembre 23, 2009, 11:54:37 »

Hola gcastillo, como te prometi me hice un lugar y baje la arduino 0017
y saque algo en limpio, fijate a ver si funciona.

En Processing algo cambio pero no pude verlo todavia

Citar
// begin sending over serial port
  beginSerial(9600);
}

Aca debes cambiar beginSerial a Serial.begin

Citar
// if value is high then send the letter 'H' else send 'L' for low
if (value)  serialWrite('H');   
            else
            serialWrite('L');

Aca cambiar serialWrite por Serial.write

otro cambio que tuve que hacer en otro es el siguiente

Código:
// 8 variables for each pin
  int digitalInput_1 = 3;  digitalInput_2 = 4;  digitalInput_3 = 5;  digitalInput_4 = 6;
  int digitalInput_5 = 7;  digitalInput_6 = 8;  digitalInput_7 = 9;  digitalInput_8 = 10;

por

Código:
// 8 variables for each pin
  int digitalInput_1 = 3; 
  int digitalInput_2 = 4; 
  int digitalInput_3 = 5; 
  int digitalInput_4 = 6;
  int digitalInput_5 = 7; 
  int digitalInput_6 = 8; 
  int digitalInput_7 = 9; 
  int digitalInput_8 = 10;

Con esto deberias poder compilar sin problemas

Saludos


* pa_8Switches.rar (72.85 KB - descargado 151 veces.)
* pa_PushButton.rar (13.31 KB - descargado 175 veces.)
En línea
gcastillo
PIC10F
*
Desconectado Desconectado

Mensajes: 2


« Respuesta #4 : Noviembre 23, 2009, 09:00:14 »

gracias maestro, lo estoy revisando, saludo
En línea
Páginas: [1]   Ir Arriba
  Imprimir  
 
Ir a:  

Impulsado por MySQL Impulsado por PHP Powered by SMF 1.1.18 | SMF © 2011, Simple Machines
SMFAds for Free Forums
XHTML 1.0 válido! CSS válido!
Página creada en 0.222 segundos con 29 consultas. (Pretty URLs adds 0.008s, 3q)