Pages: [1]   Go Down
Author Topic: send a message to computer !  (Read 971 times)
0 Members and 1 Guest are viewing this topic.
Britanny
Offline Offline
Full Member
***
Karma: 0
Posts: 233
Mais vrai, j'ai trop pleuré, toute lune est atroce
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Am I well understood....
in the "knock sensor"'s Tutorial, it's written
Code:
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
Logged

Forum Administrator
MMX
Offline Offline
Edison Member
*****
Karma: 37
Posts: 1139
hallo kompis
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Forum Administrator
MMX
Offline Offline
Edison Member
*****
Karma: 37
Posts: 1139
hallo kompis
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Britanny
Offline Offline
Full Member
***
Karma: 0
Posts: 233
Mais vrai, j'ai trop pleuré, toute lune est atroce
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great smiley-grin

i've used the led_blink script and add a printString
Code:
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" smiley-razz
« Last Edit: November 23, 2005, 02:54:08 am by mrbbp » Logged

Pages: [1]   Go Up
Jump to: