|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||||
|
|||||
|
Re: Joystick Ports as Duplex Data Port
Quote:
|
|
#3
|
|||||
|
|||||
|
Re: Joystick Ports as Duplex Data Port
Quote:
The Dashboard port is exactly what you are looking for, however. Don |
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
|||||
|
|||||
|
Re: Joystick Ports as Duplex Data Port
Quote:
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. |
|
#6
|
|||
|
|||
|
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). Last edited by zachriggle : 03-02-2006 at 23:17. |
|
#7
|
|||
|
|||
|
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? |
|
#8
|
|||
|
|||
|
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).
|
|
#9
|
||||
|
||||
|
Re: Joystick Ports as Duplex Data Port
Quote:
A dashboard port related question, the data transfer through it is output only, correct? |
|
#10
|
|||
|
|||
|
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.. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Updated: Serial Port Driver Code | Kevin Watson | Programming | 4 | 05-02-2005 18:39 |
| New Serial Port Driver | Kevin Watson | Programming | 16 | 09-01-2005 01:56 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| Fried program slots? | Jeff Waegelin | Programming | 18 | 19-03-2003 18:08 |
| Limiting PWM in pbasic | archiver | 2001 | 4 | 24-06-2002 00:38 |