SERTXD is just for transmitting via the download cable my bad. You already made a SEROUT program which is similar to mine below:
#picaxe 14m2
#DEFINE INPUT_PIN C.4
#DEFINE OUTPUT_PIN B.1
main:
SERIN INPUT_PIN, N4800_4...
I think SERTXD command needs to be used, to send serial data back through the download cable and to the pc.
I think you need something like this below..
#picaxe 14m2
#DEFINE INPUT_PIN C.4
main:
GPS1_Read:
SERIN INPUT_PIN, N4800_4...
Are you sure its not supposed to be T4800_4 instead of N4800_4?
Testing this out wouldn't hurt.. I'm reading other peoples experiences with reading GPS NMEA data using PICAXE and they all use T.
I'm not sure why this is happening Constantine, will have to read more into it. :(
It should at least read the sentence and not go into a timeout..
Try removing the timeout qualifier in the serin command see if that works.
I have followed your scenario table and managed to simulate all scenarios listed. I forgot to move the buzzer reset after each serin command.. so this is now removed.
Also, if both GPS's have timed out.. GPS2 is selected by default... I'm can't figure out why this is happening, but if they both...
I'm not sure whats happened there but the first line of code should read 'if GPS1_ERROR<3 then' like below. I've used an else statement here, so might be confusing.
Active_GPS:
if GPS1_Error =3 then
if GPS2_Error=3 then
HIGH Buzzer 'No active GPS, sound alarm...
We will fix them :) I think I may have to combine the timeout loops we added to the scan loops.. I've started this already and will post the results later when I'm home from work.
Yes I like your thinking, this should solve the problem :)
However.. In the program we have an error variable to filter out anomalies by incrementing to 3 when there is bad data and decrementing back to 0 to indicate good data. The TIMEOUT function does not include this.. and if a gPS is giving...
Your right it will not go to Active GPS.. At the end each TIMEOUT1 and TIMEOUT2 loop I think we need change goto too GPS1_Scan and GPS2_Scan respectively.
I found an error in the program, because I created two new variables one of them kept overwriting w9.
I've now moved w9 to w10 and w10 is now w11.
For clarity here is the complete current code.
If a GPS times out it goes to the TIMEOUT1 or TIMEOUT 2 section and the variable becomes a 1. If both variables are 1 then the buzzer goes high.
A timeout will only occur if the picaxe does not recieve a GPGSA NMEA Sentence... this is regardless of whether the data is complete. So even if the...
That's great Constantine, I think there is a slight issue though. The way its setup, if the GPS1 is read ok and GPS2 timeouts... the buzzer goes high.
I've modified this slightly and created a timeout variable for each GPS, if both variables = 1 then both GPS's have timed out and the buzzer...
Thanks Chris! It's been great to write some PICAXE code for a project like this :) and help out a friend!
Nice diagram ;) are we still moving the two LEDS from the relay to the PICAXE Constantine? I noticed these posts are a day old and somehow missed them.
Hi Arul,
Do you still have the damaged resistors and battery? If so what are the resistor values and battery specs?
Include some pictures of the whole unit, any damage and the LEDS used if possible.
What colour are the LED's?
Thanks,
Ash