Go Down

Topic: send a message to computer ! (Read 1 time) previous topic - next topic

mrbbp

Am I well understood....
in the "knock sensor"'s Tutorial, it's written
Code: [Select]
printString("Knock!");
Is this a way to send something from the board to the computer ?
Is it possible to receive the code (the mesage, the string) in an app (director, Processing) ?

Yes i'm really a newb :-X

regards

eric

David Cuartielles

Hej Eric,

you could start through using one of the terminal software packages we have replicated in our file-repository:

http://webzone.k3.mah.se/projects/arduino-workshop/upload/default.asp?folder=8

(choose Windows or Mac)

With those programs it is possible to read what is happening in the serial communication between your board and the computer.

On the other hand, you can use any computer program that has access to the serial port to read the data. Director with the serial Xtra is a good candidate. Processing 095 (the latest version) has a great example to read data from the serial port, etc.

Why don't you start with the serial terminal in order to understand how things work, and then you jump to use e.g. Processing? (Unless you are already familiar to Processing, when it would be much better to start that way)

/David

David Cuartielles

Hej again,

in order to make it even simpler, I have updated the example with the piezo and added the code yo would need to make it work in processing.

Take a look at:

http://arduino.berlios.de/index.php/Tutorial/KnockSensor

/David

mrbbp

#3
Nov 23, 2005, 08:32 am Last Edit: Nov 23, 2005, 08:54 am by mrbbp Reason: 1
Great :D

i've used the led_blink script and add a printString
Code: [Select]
void loop()
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  printString ("Allume");       // envoie une chaine sur le port serie
  printByte(10);                // EOLN
  printByte(13);                // CR (retour charriot)
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  printString ("Eteint");       // envoie une chaine sur le port serie
  printByte(10);                // EOLN
  printByte(13);                // CR (retour charriot)
  delay(1000);                  // waits for a second
}

cool.

I've tested  with the serproxy (thx Massimo for the late answer) and Flash (code from instantSoup) and works great too.

thanks :-*

PS: what is an EOLN ?...
I've found : "End Of LiNe" :P

Go Up