Rebol Talk Forum  |  Getting Started  |  Ask the Guru! (Moderator: Carl)  |  Topic: serial aplication GUI for grafic plot
Pages: [1] Print
Author Topic: serial aplication GUI for grafic plot  (Read 446 times)
roussey
Newbie
*
Offline Offline

Posts: 1


View Profile
serial aplication GUI for grafic plot
« on: May 12, 2008, 09:32:44 PM »

Hi,

I am new here and with Rebol. I want to know the steps I should follow to make a GUI that receives data from serial port and show the grafic in real time or almost real time. This grafic is the reponse of a control system that i designed.

Thanks.
Logged
notchent
Newbie
*
Offline Offline

Posts: 40


View Profile WWW
Re: serial aplication GUI for grafic plot
« Reply #1 on: May 15, 2008, 08:28:30 AM »

Hi Roussey,

Here are some basics about serial port use:  http://www.rebol.com/docs/changes.html#section-6.3

There's much more info in the mail list archives at rebol.org.  Check the box for "All" years, and enter "serial port" as your search term.  That'll provide a lot to dig into about serial port data.

To make the graph, you can use "poke" to plot points directly on a view layout, as in this example:

Code:
rebol []

pic: make image! 400x400
plot: func [image x y color][
pixel: to-pair compose [(x) (y)]
poke image pixel color
]
view layout [
scrn: image pic
btn "plot" [
y: 1
for x 1 300 1 [
plot pic x y white
show scrn
y: y + 1
]
]
]

The dialect below may also provide an easy alternate solution for you: 

http://musiclessonz.com/rebol_tutorial/ez-plot.zip 

(the very first example in the demo crashes in the newest releases of Rebol, but you can still get through the rest of the tutorial). 

To work with graphics more, you should learn about Rebol's "draw" dialect.  You can get a basic introduction here:  http://musiclessonz.com/rebol_tutorial.html#section-23.2 , and then try searching rebol.org for "graph" and "plot".  This link might be helpful to get you started:

http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-thread.r?m=rmlFLLC

Hope that helps Smiley

- Nick Antonaccio
Logged

Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Ask the Guru! (Moderator: Carl)  |  Topic: serial aplication GUI for grafic plot
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 09:05:24 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2287 Posts in 593 Topics by 3725 Members
Latest Member: Heigueundulge

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc