Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumSuggestionsSoftware Suggestions › Serial monitor:  "send"

Page Index Toggle Pages: 1
Serial monitor:  "send" (Read 20632 times)
12/12/07 at 16:20:15

Titus   Offline
Full Member
Wiring Soccer Robot!
Amsterdam

Posts: 176
***
 
Dear Barragan,

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

Take a look at this:

Wiring:
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.


Arduino:
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:
http://www.ladyada.net/learn/arduino/lesson4.html
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.

Titus
« Last Edit: 12/13/07 at 10:08:39 by Titus »  

Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
 
Reply #1 - 12/13/07 at 17:42:06

Kars   Offline
YaBB Newbies
Team Vossius
Amsterdam

Posts: 19
*
 
Hmm great idea  Smiley

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.
 

Buildig the same as Titus ^^
IP Logged
 
Reply #2 - 12/13/07 at 19:29:58

Titus   Offline
Full Member
Wiring Soccer Robot!
Amsterdam

Posts: 176
***
 
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.
 

Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
 
Reply #3 - 03/02/08 at 10:52:08

Titus   Offline
Full Member
Wiring Soccer Robot!
Amsterdam

Posts: 176
***
 
Barragan, any thoughs on this?

Titus
 

Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
 
Reply #4 - 03/06/08 at 02:48:42

gareth.ky   Offline
YaBB Newbies
USA

Posts: 1
*
 
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.
 
IP Logged
 
Reply #5 - 03/06/08 at 13:06:12

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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 Smiley
 
IP Logged
 
Reply #6 - 03/10/08 at 05:43:21

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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.
 
IP Logged
 
Reply #7 - 04/21/08 at 13:58:57

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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.
http://wiring.org.co/download/wiring-0016.zip
http://wiring.org.co/download/wiring-0016.dmg
http://wiring.org.co/download/wiring-0016.tgz
 
IP Logged
 
Reply #8 - 04/21/08 at 15:08:26

Titus   Offline
Full Member
Wiring Soccer Robot!
Amsterdam

Posts: 176
***
 
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 Tongue

Titus
 

Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
 
Reply #9 - 05/27/08 at 14:54:23

Titus   Offline
Full Member
Wiring Soccer Robot!
Amsterdam

Posts: 176
***
 
Barragan,

We are still in the complete dark.

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

Please help us

Titus
 

Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
 
Reply #10 - 05/27/08 at 14:57:13

Kars   Offline
YaBB Newbies
Team Vossius
Amsterdam

Posts: 19
*
 
Hi,

Im quiet curious too how the serial send command works
 

Buildig the same as Titus ^^
IP Logged
 
Reply #11 - 05/28/08 at 01:27:59

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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.
 
IP Logged
 
Reply #12 - 05/28/08 at 09:54:34

Titus   Offline
Full Member
Wiring Soccer Robot!
Amsterdam

Posts: 176
***
 
what kind of characters barraggan?
like
variable_counter=2;
Does your pre-uploaded program need a special command to receive it?

Titus
 

Check www.TeamVossius.nl for our Autonomous soccer robots!
IP Logged
 
Reply #13 - 05/28/08 at 16:55:38

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
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.

 
IP Logged
 
Page Index Toggle Pages: 1