Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Control System (http://www.chiefdelphi.com/forums/forumdisplay.php?f=177)
-   -   Joystick Ports as Duplex Data Port (http://www.chiefdelphi.com/forums/showthread.php?t=42806)

zachriggle 27-01-2006 22:59

Joystick Ports as Duplex Data Port
 
Is it possible to not only transmit data through the joystick port, but to also receive it? I understand that this may not (most likely will not, I think I remember reading something along those lines) be allowed during the competition, but it would help immensely for debugging purposes.

My reason for asking is that I want a diagnostic system that will work when the FRC isn't hooked up directly via parallel port, and can't afford (the Team can't) to shell out $100+ on a wireless radio set for the RS232 port.

Adam Richards 27-01-2006 23:00

Re: Joystick Ports as Duplex Data Port
 
Quote:

Originally Posted by zachriggle
Is it possible to not only transmit data through the joystick port, but to also receive it? I understand that this may not (most likely will not, I think I remember reading something along those lines) be allowed during the competition, but it would help immensely for debugging purposes.

My reason for asking is that I want a diagnostic system that will work when the FRC isn't hooked up directly via parallel port, and can't afford (the Team can't) to shell out $100+ on a wireless radio set for the RS232 port.

Have you looked into hooking a laptop up to the dashboard port?

DonRotolo 31-01-2006 22:06

Re: Joystick Ports as Duplex Data Port
 
Quote:

Originally Posted by zachriggle
Is it possible to not only transmit data through the joystick port, but to also receive it? I understand that this may not (most likely will not, I think I remember reading something along those lines) be allowed during the competition, but it would help immensely for debugging purposes.

My reason for asking is that I want a diagnostic system that will work when the FRC isn't hooked up directly via parallel port, and can't afford (the Team can't) to shell out $100+ on a wireless radio set for the RS232 port.

The short answer is no. The four Joystick ports on the OI are inputs to the OI only (with the exception of a small amount of +5 volts coming out of the OI to read the joystick potentiometers).

The Dashboard port is exactly what you are looking for, however.

Don

Matt Krass 31-01-2006 23:12

Re: Joystick Ports as Duplex Data Port
 
To be entirely honest, some of them have LED outputs, but that allows a very limited amount of data and you can view the LEDs right on the OI, default code I believe makes them show which way the joystick inputs are pointed for calibration, but you can change that.

Alan Anderson 01-02-2006 07:32

Re: Joystick Ports as Duplex Data Port
 
Quote:

Originally Posted by zachriggle
...for debugging purposes...

Yes, the Dashboard port is probably what you want to use.

But if you want simple debugging without the need for a computer, you can send a single number to the numeric display on the OI. See the very end of the Default_Routine() in the default code, where it formats the backup battery voltage to be displayed as the User Byte. Last year, I used one of the joystick wheels to select among several feedback values as diagnostic display.

zachriggle 03-02-2006 23:15

Re: Joystick Ports as Duplex Data Port
 
Has anyone written any software that converts the dashboard to a terminal (even if readonly)? There are 7 (8?) user-settable bits. 8 bits in an ASCII character (you can get by with 6, using a modified character table)... how fast is the refresh rate? Assuming it's faster than 26ms (ms = thousandths... so 40 chars\s max if limited to 26ms), you could have a relatively simple readonly text print-out of whatever you wanted.

Writing the software wouldn't be hard, especially if you used Linux (Serial port access is simpler).

@Edit
Where is the code that controls the joystick wheels? I can't seem to locate that little bit, and it's driving me INSANE. I want to use it as a toggle switch... I figure you could get 3-4 states out of it with relative precision... 2 at least (top and bottom). Also, will we have to use FIRST-provided joysticks, or will we be able to use our own (assuming I do a mod to said wheels to make them click into place).

chickensofdoom 06-02-2006 17:09

Re: Joystick Ports as Duplex Data Port
 
Yeah, we're trying to do something similar on our team. We have a palm pilot, and some software that emulates an LCD screen with it, and we're hoping to be able to use it to remotely display statistics (wheel speed, pot positions, etc.)

We just started working on it, so I'm still having trouble figuring out exactly how to output to the LCD manually and everything.

Anyway... I'd probably just plug it into the Dashboard port if I plan to interface to it, then?

zachriggle 06-02-2006 21:17

Re: Joystick Ports as Duplex Data Port
 
Yeah, you probably need a RS232 converter cable, though. Luckily, Axim x50 series RS232 cables are readily available (but for the steep-arse price of $50).

ForgottenSalad 07-02-2006 01:35

Re: Joystick Ports as Duplex Data Port
 
Quote:

Originally Posted by zachriggle
Has anyone written any software that converts the dashboard to a terminal (even if readonly)? There are 7 (8?) user-settable bits. 8 bits in an ASCII character (you can get by with 6, using a modified character table)... how fast is the refresh rate? Assuming it's faster than 26ms (ms = thousandths... so 40 chars\s max if limited to 26ms), you could have a relatively simple readonly text print-out of whatever you wanted.

Writing the software wouldn't be hard, especially if you used Linux (Serial port access is simpler).

If anyone out there has anything like this please post or PM it... While having a full-fledged dashboard is nice, I would much prefer a terminal type readout.

A dashboard port related question, the data transfer through it is output only, correct?

devicenull 07-02-2006 18:19

Re: Joystick Ports as Duplex Data Port
 
A better idea would be a sort of lookup table. You would have a table in your dashboard program, with stuff like:
"Battery voltage %i"
"Doing something - %i %i"
"I broke something"

Then, the RC would set say User_Byte1 to the correct value, and the rest of the user bytes to the parameters for that message. The dashboard program would then read those and display the proper message. Just using User_Byte1, you could have 255 messages..


All times are GMT -5. The time now is 20:29.

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