Go to Post I got Vista with mine. It's like getting moldy fruitcake for Christmas. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #31   Spotlight this post!  
Unread 06-06-2002, 16:41
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
You know, I just thought of something else. IBM has this cool technology called Sash that I've read about. It basically uses simple languages like JavaScript and HTML to create what they call a "Weblication" which is really a full fledged program. A description from the IBM site:
Quote:
Weblication is the IBM name for a Sash application that uses Web technologies such as HTML, JavaScript, and XML. Sash Weblications also take advantage of operating system functionality (file system, networking, and user interface). Sash Weblications are built using the Sash Weblications Developer Kit (WDK). The WDK makes it easy for you to develop and publish Sash Weblications on the Web
You probably don't want to start fresh on your project but you may want to check it out for future projects. I've personally never tried it but it sounds cool. It has the potential to make it easy to write GUI applications while still allowing you to work with the hardware (serial port, networking, etc.). Check it out at IBM's Sash site.

It's all free, BTW.
  #32   Spotlight this post!  
Unread 06-06-2002, 16:52
DanL DanL is offline
Crusty Mentor
FRC #0097
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Somerville, MA
Posts: 682
DanL is just really niceDanL is just really niceDanL is just really niceDanL is just really niceDanL is just really nice
Send a message via AIM to DanL
Okay, let me clarify the design of our dashboard program a little bit.

The key element that we want to have is style and visual apeal. Now, since refresh rate isn't that important, we decided to make the display in Flash.

The problem is that Flash only does scripting - not any real programming. It's designed for the web, not real programming. As I see it, the only way to get Flash to read the info from the Dashboard is to use the import data options in Flash.

Flash has two ways to inport data. One is to read from a text file, and the other is to get it in through a server-side script - php, asp, cgi, etc. (remember, flash was designed for the internet, not programming). To get it from a server-side script, I suppose the best way would be to make it read from a database. However, 1. we don't know how to access databases in C/C++. and 2. even if we could, I'd think that having the C++ store the info in a database, then have flash request the info from a php page several times a second is a bit slower than the alternative.

The second way flash imports data is by a text file. We decided the fastest way would be to have the C++ proggie running in the background and constantly rewriting the text file while the flash proggie reads the data and displays it in style.

Yes, we realize this isn't the most efficient way, but again, our priority is style over refresh rate. The goal of this proggie is more of something that shows off to potential sponsors or visitors what we can do - not something for debuging the robot like StangSense (which is something I'd definately like to learn more about some other time).

We did consider that this would be very inefficient. However, to test just how inefficient it was, Ian and I created two small test proggies. The C++ one basically wrote to the text file one variable in an infinite loop, and the flash displayed it. Using just one variable and no additional calculations, the refresh rate is still better than we expected - easily about 10 times per second. I'm not sure how the additional calculations (both decoding the data sent in and the calculations required in the display proggie) will affect speed, but it should be good enough for our purposes.
__________________
Dan L
Team 97 Mentor
Software Engineer, Vecna Technologies
  #33   Spotlight this post!  
Unread 06-06-2002, 16:55
DanL DanL is offline
Crusty Mentor
FRC #0097
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Somerville, MA
Posts: 682
DanL is just really niceDanL is just really niceDanL is just really niceDanL is just really niceDanL is just really nice
Send a message via AIM to DanL
Quote:
Originally posted by Dave Flowerday
I wonder if the Flash app can use a pipe? I know some applications on Windows use pipes, so it's possible...

For those who don't know, a program works with a pipe similar to the way it works with a file, except there's no file. This would be a perfect application for a pipe. Basically, the program reading the serial port could write the data stream to the pipe, and the Flash program could read the data from the pipe. This is what I think you're trying to do now, except it eliminates the disk from the equation, and solves the file locking issues that rbayer was talking about.
Flash I'm pretty sure can't do that - as I explained, Flash just imports either through a text file or through a server-side script. But I'm sure Macromedia has taken this into account. I'm pretty sure other Macromedia things like Director or ColdFusion are designed more for what we're trying to do, but don't hold me to that.
__________________
Dan L
Team 97 Mentor
Software Engineer, Vecna Technologies
  #34   Spotlight this post!  
Unread 06-06-2002, 17:10
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
last thing, can anyone think of any way to jump out of the endless loop besides 'ctrl + c'?
The only way I can think of is to constantly monitor the keyboard and quit if you hit a certain key.

As for having the serial port and file open, it should work. Using regular fstreams, you can have as many files open as you want--no limits as far as I know. Same thing with Windows handles.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #35   Spotlight this post!  
Unread 06-06-2002, 17:45
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
ok thanks. only one more problem then. how can i moniter the keyboard without stopping every loop cycle? i know about cin and fin (fstream). that's all. both stop until data is put in and the 'enter' key is hit. that wouldn't do. there must be some way around this, anyone know how? cause if that works, then the program will actually work better than i expected
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #36   Spotlight this post!  
Unread 06-06-2002, 17:56
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Quote:
Okay, let me clarify the design of our dashboard program a little bit.

The key element that we want to have is style and visual apeal. Now, since refresh rate isn't that important, we decided to make the display in Flash.

The problem is that Flash only does scripting - not any real programming. It's designed for the web, not real programming. As I see it, the only way to get Flash to read the info from the Dashboard is to use the import data options in Flash.
Yeah I understand your need for a nice looking GUI for this and that's exactly why I suggested Sash. What I understand of it is that it allows you to simply and easily code up fancy GUI programs but also allows you to retain access to serial ports, hardware, etc which Flash does not. Like I said, you wouldn't want to restart your program with this instead by any means, but for future projects it might offer a little more flexibility.

I'm not trying to imply that your design isn't good or won't work. It's actually a pretty common way to pass data around. I was just trying to help think of ways that you can improve the throughput without sacrificing the visual effectiveness of the project. It sounds like you've done the appropriate testing and are confident that this solution will work, so best of luck and keep us posted!

Also, I wrote a program that spits out fake Dashboard port data for use in testing our Palm app for StangSense. Ian mentioned that you are losing access to your robot after this weekend, so maybe this could help. I could probably revive that and you could then hook two PCs together and have one pretend to be the operator interface if that would help... You also might be able to hook a PC up to the Operator Interface and just capture the Dashboard data to a file using Hyperterminal which you could then play back to the other PC. We never got that to work for us (hence the program to generate Dashboard data) but maybe you'd have better luck.
  #37   Spotlight this post!  
Unread 06-06-2002, 18:18
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
yes, a program like that would be great. i just wish i could take home the extra OI/RC and some joysticks... it's not like i'd break it. heck, i carried a school laptop around at all the competitions. it still works, sorta .
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #38   Spotlight this post!  
Unread 06-06-2002, 18:21
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
also, i'm going to look into that sash thing. seems interesting, so i'll try it over the summer. heck, if i can figure it out, i might just start over. never hurts to do something twice.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #39   Spotlight this post!  
Unread 06-06-2002, 18:23
SlamminSammy's Avatar
SlamminSammy SlamminSammy is offline
Registered User
no team
Team Role: College Student
 
Join Date: Jun 2002
Location: Glasgow, Scoland
Posts: 140
SlamminSammy is on a distinguished road
Send a message via AIM to SlamminSammy
Question

Quote:
Originally posted by SuperDanman
Okay, let me clarify the design of our dashboard program a little bit.

The key element that we want to have is style and visual apeal. Now, since refresh rate isn't that important, we decided to make the display in Flash.

The problem is that Flash only does scripting - not any real programming. It's designed for the web, not real programming. As I see it, the only way to get Flash to read the info from the Dashboard is to use the import data options in Flash.
I recommend using C, C++, or PERL to create an ASP program that feeds into a website. Using Adobe Illustrator you can create a very appealing dashboard
  #40   Spotlight this post!  
Unread 06-06-2002, 20:06
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
I'll have to check that Sash stuff out too...

Anyway, if you can't get that to work, try the VC++ resource editors. They are simple to use and allow you to create powerful MFC-based programs even if you don't know MFC (sounds impossible, but its true). Also, if you're looking to learn real Windowing/Messaging/GUI stuff this summer, and you want to do it for Windows, I'd recomend you find a copy of Charle's Petzold's Programming Windows. It's a GIANT 1400 page book and is far and away the best one on the Windows API that I have ever read (and it presents it in such a way that you will be able to make the switch to MFC fairly easily later on). Anyway, that was my summer reading last year, and it's what I used to write my RoboGUI program.

Anyway, if you need any real-time help, I'll be on ICQ for the rest of the night while I work on some of my programming projects. #152894206.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #41   Spotlight this post!  
Unread 06-06-2002, 22:15
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
[edit]

i figured out my problem, so no need to show my stupidity

[/edit]
__________________
AIM --> Woloi
Email --> ian@woloschin.com

Last edited by Ian W. : 06-06-2002 at 22:23.
  #42   Spotlight this post!  
Unread 06-06-2002, 23:20
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
Nerd Vandalism

  #43   Spotlight this post!  
Unread 07-06-2002, 00:07
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
That's pretty cool! [Except for the defacing other people's property thing...] This one's my favorite:


Last edited by Dave Flowerday : 07-06-2002 at 00:24.
  #44   Spotlight this post!  
Unread 07-06-2002, 00:21
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Quote:
Originally posted by rbayer
Also, if you're looking to learn real Windowing/Messaging/GUI stuff this summer, and you want to do it for Windows, I'd recomend you find a copy of Charle's Petzold's Programming Windows. It's a GIANT 1400 page book and is far and away the best one on the Windows API that I have ever read (and it presents it in such a way that you will be able to make the switch to MFC fairly easily later on).
Yes, it's a great book. It's what I've been using to learn Windows programming this summer.
  #45   Spotlight this post!  
Unread 07-06-2002, 15:46
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
Quote:
Originally posted by Dave Flowerday
That's pretty cool! [Except for the defacing other people's property thing...]
It wasn't me!

I got the picture in an email, and I think the billboard was somewhere in England.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Win32 serial port - recieve buffer seanwitte Programming 4 05-11-2003 21:41
White Paper Discuss: FIRST Editor v1.2 CD47-Bot Extra Discussion 1 18-09-2003 19:32
How to communicate both through radio and serial port? JC Denton Programming 1 08-02-2003 23:43
Ever seen this serial port problem before??? Aidan F. Browne Programming 5 05-02-2003 12:03
serial communication using c++ Malakili Programming 31 01-05-2002 15:51


All times are GMT -5. The time now is 10:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi