Go to Post A sign of character is the ability to move on and make the best of what you have, even if you feel you were completely wronged. - Cory [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
  #1   Spotlight this post!  
Unread 10-02-2007, 14:57
bomber7 bomber7 is offline
Humanoid
FRC #0585
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: CA - Tehachapi
Posts: 20
bomber7 is an unknown quantity at this point
Arrow Getting Robot Outputs

YEA FIRST POST (and hopefully in the right area)

My team likes outputs, lots and lots of outputs from the robot.
They want to see everything from the motor values to custom switches and additional windows for messages. The ifi loader's window that displays the printfs just wont do! So i set out to make a VB application to split the outputs from the robot and things like that. Unfortunitly when i try and read the comport all i get is two numbers repeating themselves like...
8376837683768376
i added separators so it looked like this....
83|76|83|76|83|76|83|76
How do i get the printf data out of this?!
  #2   Spotlight this post!  
Unread 10-02-2007, 15:55
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Getting Robot Outputs

well, i'll show you ours, maybe you'll get an idea from that:
Code:
PrintData(){
	printf("\r------------------------- USER INPUTS -------------------------------\r");
	printf("Joystick 1 Y-axis: %d\t Joystick 1 Trigger: %d\r", left_joy, p1_sw_trig);
	printf("Joystick 2 Y-axis: %d\t Joystick 2 Trigger: %d\r", right_joy, p2_sw_trig);
	
	printf("\r------------------------- PWM OUTPUTS -------------------------------\r");
 	printf("Left Motor: %d\t Right Motor: %d\r",  (int)left_motor, (int)right_motor);
 	printf("Relay 1 Forward: %d\t Relay 1 Reverse: %d\r", relay1_fwd, relay1_rev);
 	printf("Relay 2 Forward: %d\t Relay 2 Reverse: %d\r", relay2_fwd, relay2_rev);

/*	printf("\r------------------------- SENSORS -------------------------------\r");
*/
	printf("\r------------------------- VARIABLES -------------------------------\r");
	printf("Alt Left Encoder: %dl\t Alt Right Encoder: %dl\r", Encoder_1_Counter, Encoder_2_Counter);
	
}
that prints all of our stuff in nice orderly rows. You can use that code if you want. We have it print every few seconds
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
  #3   Spotlight this post!  
Unread 10-02-2007, 16:23
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Getting Robot Outputs

If I were you, I would investigate the Dashboard Viewer.

Besides the "official" link given, you will find numerous independent viewers available by searching these forums and the white papers section. Many have source code attached which allows you to modify as you see fit.

One of my favorites was this one by Sean Witte.

Good luck,

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
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
Getting attached to your robot Jherbie53 General Forum 13 02-03-2008 14:42
Getting data from the robot mfwit LabView and Data Acquisition 1 19-02-2006 20:07
Relay outputs on rc jdawson Electrical 4 26-01-2003 12:51
Getting a grip on robot technology archiver 2001 2 24-06-2002 01:20
Relay Outputs OddOne Technical Discussion 3 01-02-2002 19:52


All times are GMT -5. The time now is 04:54.

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