hi,
i need some help here ...
i want to have an antenna tracker and i found a code for arduino but the problem i have is, that the code needs rssi ( signal strength ) input from two different video receivers and i already have an expensive diversity receiver ( 2 antennas ) which has a special tracker port for an expensive antenna tracker. this tracker port puts out different information, amongst others the rssi signal i need for the cheap tracker.
this is the stuff the tracker port puts out , i copied it from another document, the guy who posted it doesnt seem that sure but noone corrected him yet
My discovery of "Tracking link output".
Please correct me if you have other information.
Tracker Link output:
Yellow (Video) - Video output
White (Audio L) - ???
Red (Audio R) - RS232 TTL Telemetry output
Telemetry protocol:
Bitrate:19200bps
Sends 6 byte message with frequency: ~30Hz (probably related to video frame rate)
Message example (HEX):
AA 03 75 79 96 55
AA - Sync byte
03,04 - ??
RSSI 2 Bytes 75 - Channel1 79 - Channel2, ~12 - maximum signal, ~79 - no signal
96 - Power voltage 11v-8F 12v-9B 10v-7F
55 - end of message
and this is a link to the software i wanted to use for my arduino tracker
can anyone please help me , or at least show me, how i can get my rssi1 and rssi2 values from the tracker port?
Set your serial port to be 19200 baud.
Your loop code waits for a character available and inputs it.
If it is the Sync byte, which is 0xAA, it reads the next 5 bytes and stores the 3rd and 4th as your rssi values.
Before using them you map them to the 0-100 range that your tracker software needs.
int rss1=0, rss2=0;
void setup()
{
Serial.begin(19200);
}
void loop()
{
byte incomingByte;
if (Serial.available() > 0)
{
// read the incoming byte:
incomingByte = Serial.read();
if (incomingByte == 0xAA)
{
while (Serial.available() <= 0) ; // just wait. need the semicolon as a null
Serial.read(); // waste the 2nd byte
while (Serial.available() <= 0) ;
rss1 = Serial.read();
while (Serial.available() <= 0) ;
rss2 = Serial.read();
while (Serial.available() <= 0) ;
Serial.read(); // waste the 5nd byte
while (Serial.available() <= 0) ;
Serial.read(); // waste the 6nd byte - last of message
rss1 = map (rss1, 0x79, 0x12, 0, 100);
rss2 = map (rss2, 0x79, 0x12, 0, 100);
}
}
}
I'd verify the slight weirdness that the value for max signal is smaller than no signal. If not, adjust the map statements appropriately.
hey , thanks for that
can i just put that in front of the already existing code now and it should work ?
i just need to define an input and tell the existing code to take these values and not look at the original input ports , am i right ?