Show Posts
|
|
Pages: [1] 2
|
|
2
|
Using Arduino / General Electronics / QT113 replacement?
|
on: October 25, 2012, 12:24:45 pm
|
Hi, I want to do a "Touch Sensor" with proximity sensor, and in the past, i found that QT110 or QT113 works very well to build that but they don't longer made those, is no longer manufactured. Do you know another IC like QT113 or QT110 ? for what can i replace it ? Thanks ! 
|
|
|
|
|
4
|
Using Arduino / Networking, Protocols, and Devices / Re: MIDI INPUT AND READING BYTES
|
on: March 08, 2011, 06:15:22 am
|
hi again, yes, you are right is better, i learnt actionscript and not C++, so i was doing it wrong. but still, i don't get it, when i try to read my incommingByte it says things like this:  do you have a clue, why? how can i control de midi notes if the are not numbers? how i can use my "if condition"? void loop () { if (Serial.available() > 0) { // read the incoming byte: incomingByte = Serial.read(); Serial.print("I read a "); Serial.println(incomingByte);
// wait for as status-byte, channel 1, note on or off if (incomingByte== 144){ // note on message starting starting action=1; }else if (incomingByte== 128){ // note off message starting action=0; }else if (incomingByte== 208){ // aftertouch message starting //not implemented yet }else if (incomingByte== 160){ // polypressure message starting //not implemented yet }else if ( (action==0)&&(note==0) ){ // if we received a "note off", we wait for which note (databyte) note=incomingByte; playNote(note, 0); note=0; velocity=0; action=2; }else if ( (action==1)&&(note==0) ){ // if we received a "note on", we wait for the note (databyte) note=incomingByte; }else if ( (action==1)&&(note!=0) ){ // ...and then the velocity velocity=incomingByte; playNote(note, velocity); note=0; velocity=0; action=0; }else{ //nada } } }
thanks a lot for your time and help!
|
|
|
|
|
5
|
Using Arduino / Networking, Protocols, and Devices / Re: MIDI INPUT AND READING BYTES
|
on: March 07, 2011, 10:06:51 am
|
|
my problem is not how to visualize a variable with serial.print, cause i was doing Serial.println(incomingByte +" : incomingByte");
and your proposition is the same : Serial.print("I read a "); Serial.println(incomingByte);
my problem is that i have the impression that i can not read the bytes, theres always strage symbols or caracters in the serial.print, like $, é,£, etc
thanks anyway.
|
|
|
|
|
6
|
Using Arduino / Networking, Protocols, and Devices / MIDI INPUT AND READING BYTES
|
on: March 07, 2011, 08:42:01 am
|
Hi there! i'm trying to interface my arduino following a threat from the past forum ( http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1187962258/) i'm trying to receive midi data from my arduino, and i think i made it, but when i try to read the bytes from my RX port, i get nothing.....well i get something but not what i want. how can i serial.print the byte information to debugging ? like this: Serial.println(incomingByte +" : incomingByte"); ? i think not because i'm not receiving anything:  i'm a noob but i was trying to read from some websites, that's basically 0/1 information travelling in a group of 8, but can i serial.print it as we do with vars? do i have to make a for to read it? this is the code i'm using: byte incomingByte; byte note; byte velocity;
int statusLed = 13; // select the pin for the LED
int action=2; //0 =note off ; 1=note on ; 2= nada
//setup: declaring iputs and outputs and begin serial void setup() { pinMode(statusLed,OUTPUT); // declare the LED's pin as output pinMode(2,OUTPUT); pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); pinMode(6,OUTPUT); pinMode(7,OUTPUT); pinMode(8,OUTPUT); pinMode(9,OUTPUT); //start serial with midi baudrate 31250 or 38400 for debugging Serial.begin(38400); digitalWrite(statusLed,HIGH); } //loop: wait for serial data, and interpret the message void loop () { if (Serial.available() > 0) { // read the incoming byte: incomingByte = Serial.read(); Serial.println(incomingByte +" : incomingByte");
// wait for as status-byte, channel 1, note on or off if (incomingByte== 144){ // note on message starting starting action=1; }else if (incomingByte== 128){ // note off message starting action=0; }else if (incomingByte== 208){ // aftertouch message starting //not implemented yet }else if (incomingByte== 160){ // polypressure message starting //not implemented yet }else if ( (action==0)&&(note==0) ){ // if we received a "note off", we wait for which note (databyte) note=incomingByte; Serial.print(note +" : note"); playNote(note, 0); note=0; velocity=0; action=2; }else if ( (action==1)&&(note==0) ){ // if we received a "note on", we wait for the note (databyte) note=incomingByte; }else if ( (action==1)&&(note!=0) ){ // ...and then the velocity velocity=incomingByte; playNote(note, velocity); note=0; velocity=0; action=0; }else{ //nada } } }
void blink(){ digitalWrite(statusLed, HIGH); delay(100); digitalWrite(statusLed, LOW); delay(100); }
void playNote(byte note, byte velocity){ int value=LOW; if (velocity >10){ value=HIGH; }else{ value=LOW; }
//since we don't want to "play" all notes we wait for a note between 36 & 44 if(note>=36 && note<44){ byte myPin=note-34; // to get a pinnumber between 2 and 9 digitalWrite(myPin, value); }
}
thanks for all your help, Rodrigo
|
|
|
|
|
8
|
Forum 2005-2010 (read only) / Français / Controlling boxes with arduino!!!!!!!!HELP
|
on: December 01, 2008, 08:00:22 am
|
|
Bonjour, Je dois contrôler la ouverture et la fermeture des 12 grandes boites en métal. Je ne sais pas encore comme le faire au niveau mécanique. Dois-je trouvé de charnières électriques??? peux-je le faire avec des servomoteurs + un système en rail?? vos idées me seront très utiles, merci pour votre aide,
Rodrigo
|
|
|
|
|
10
|
Forum 2005-2010 (read only) / Español / Arduino consejo
|
on: February 05, 2010, 06:11:25 am
|
Hola! Estoy trabajando para un espectáculo de teatro. Debo esconder un sensor o un botón en varias sillas, para captar cuando la gente se sienta y activar un sonido en la sala. El problema es que estoy buscando una arduino sin cables (wifi o bluetooth), y ya encontré la Arduino Bluetooth, pero existe alguna otra opción mas pequeña? Cuantas Arduino Bluetooth puedo conectar a la compu? Necesito poder recibir la información de 8 sensores/botones al mismo tiempo. Cualquier consejo sera bienvenido  desde ya, muchas gracias!
|
|
|
|
|
15
|
Forum 2005-2010 (read only) / Español / Re: CONTROLANDO CAJAS CON ARDUINO!!
|
on: January 19, 2009, 05:39:09 am
|
hola! visualmente quedarîa mâs lindo si la apertura se hace desde dentro de la caja, pero bueno, tampoco es imprecindible. me parece que la idea es muy buena, tu piensas que un solenoide puede levantar una tapa de un kilo aprox.??? conocés un website, donde pueda comprarlos? muchas gracias! 
|
|
|
|
|