Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Getting Robot Outputs (http://www.chiefdelphi.com/forums/showthread.php?t=53847)

bomber7 10-02-2007 14:57

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?!

paulcd2000 10-02-2007 15:55

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

Mike Betts 10-02-2007 16:23

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


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

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