Wiring Forum
Suggestions >> Software Suggestions >> Serial monitor:  "send"

Message started by Titus on 12/12/07 at 16:20:15

Title: Serial monitor:  "send"
Post by Titus on 12/12/07 at 16:20:15
Dear Barragan,

My suggestion is something the arduino enviroment already has, so it wont be that difficult i hope.

Take a look at this:

Serial monitor: Opens a serial port connection to monitor the data comming from the Wiring I/O Board, this is very useful for debugging and verification.

Displays serial data being sent from the Arduino board (USB or serial board). To send data to the board, enter text and click on the "send" button or press enter. Choose the baud rate from the drop-down that matches the rate passed to Serial.begin in your sketch. Note that on Mac or Linux, the Arduino board will reset (rerun your sketch from the beginning) when you connect with the serial monitor.

You can also talk to the board from Processing, Flash, MaxMSP, etc (see the interfacing page for details).

In the arduino environment you can send data to the arduino board, after selecting a baud rate.

This can be quite handy. Another funny thing i say here:
You can let the wiring board talk to you, you can also do math.
This will need a few extra libaries that are already availeble
#include "math.h"               // include the Math Library

It would bepossible to send this to the wiring board:

int val;
val = analogRead(0);
Serial.print(val, DEC);?

Aswel a program that waits for a kind of message from the computer and then does something?

It is easy I think to get that libaries from arduino. Aswell as the software,

I hope more people will find this usefull.
It is really usefull for debugging things.


Title: Re: Serial monitor:  "send"
Post by Kars on 12/13/07 at 17:42:06
Hmm great idea  :)

It would be nice too if you have a button in the IDE wich tells the wiring board to set Digital pin x high/low. With this feature you dont have to upload a whole program to just let your led burn.

Title: Re: Serial monitor:  "send"
Post by Titus on 12/13/07 at 19:29:58
but if you just send a serial command over the 'serial monitor send':

pinMode(pinX, OUTPUT);
digitalWrite(pinX, HIGH);

This will do the job I think.

Title: Re: Serial monitor:  "send"
Post by Titus on 03/02/08 at 10:52:08
Barragan, any thoughs on this?


Title: Re: Serial monitor:  "send"
Post by gareth.ky on 03/06/08 at 02:48:42
I would also like:

  • The ability to dump the console to text file
  • A clear button to wipe the serial monitor without stopping it.
  • Use a font in the console that has glyphs for the entire ASCII table. AKA code page 437. e.g. '╣→☺' These characters display correctly in the code window but not in the serial monitor.

Or better yet tell me where the SVN server is so I can check out the source and I'll submit a patch file.

Title: Re: Serial monitor:  "send"
Post by barragan on 03/06/08 at 13:06:12
hi, all these seem good sugestions, great, help is really needed and apreciated. Here is the source code of the project http://wiring.uniandes.edu.co/build/index.html
also instructions to get it and build it: http://wiring.uniandes.edu.co/build/index.html
Please let me know iof you need anything else, thanks :)

Title: Re: Serial monitor:  "send"
Post by barragan on 03/10/08 at 05:43:21
I forgot to mention that math.h was already included in wiring, so all of its functions are available from the language. Please let me know if things went fine downloading and building from the sources.

Title: Re: Serial monitor:  "send"
Post by barragan on 04/21/08 at 13:58:57
hey, the send in the serial monitor was added as well as the examples with diagrams in the distribution and other fixes. Here are the release candidates, please try and let me know before making them official.

Title: Re: Serial monitor:  "send"
Post by Titus on 04/21/08 at 15:08:26
I tried upload a program, worked
I tried serial print and some math, worked

Seems like everything is working.

Though i feel stupid to ask, what can the serial monitor do exactly?
How does it work? What commands does it accept? And where are the examples. i cant seem to find them?

and btw, i'm still baned from the exhibition forum :P


Title: Re: Serial monitor:  "send"
Post by Titus on 05/27/08 at 14:54:23

We are still in the complete dark.

HOW does the serial monitor send work?
What commands can you use?

Please help us


Title: Re: Serial monitor:  "send"
Post by Kars on 05/27/08 at 14:57:13

Im quiet curious too how the serial send command works

Title: Re: Serial monitor:  "send"
Post by barragan on 05/28/08 at 01:27:59
When activating the serial monitor in the tool bar, a small text edit field and a send button appears in the "message area" of the window http://wiring.org.co/learning/environment/index.html#Overview, it is possible to type characters into it and those are sent to the Wiring hardware by pressing the send button on the right side of the text box. The program running oin the Wiring hardware will receive those characters from the serial.

Title: Re: Serial monitor:  "send"
Post by Titus on 05/28/08 at 09:54:34
what kind of characters barraggan?
Does your pre-uploaded program need a special command to receive it?


Title: Re: Serial monitor:  "send"
Post by barragan on 05/28/08 at 16:55:38
Ok, letīs look at this code:

char val;         // variable to receive data from the serial port
int ledpin = 48;  // LED connected to pin 48 (on-board LED)

void setup()
 pinMode(ledpin, OUTPUT);  // pin 48 (on-board LED) as OUTPUT
 Serial.begin(9600);       // start serial communication at 9600bps

void loop() {
 if( Serial.available() )       // if data is available to read
   val = Serial.read();         // read it and store it in 'val'
 if( val == 'H' )               // if 'H' was received
   digitalWrite(ledpin, HIGH);  // turn ON the LED
 } else {
   digitalWrite(ledpin, LOW);   // otherwise turn it OFF
 delay(100);                    // wait 100ms for next reading

this program running in Wiring waits for data from the serial. If it gets the character  'H' it will turn ON an LED connected to the pin ledPin if it is not an  'H' then it will turn OFF the LED. Using the serial monitor in the Wiring environment you could be sending a character  'H' and press sent, in this way the program above once is running in the Wiring hardware will get the  'H' and will respond appropriately, or sending other character lets say  't' the LED will be turned OFF.

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.