Good afternoon all,
I've not had any luck getting the Arduino source code and libraries from
the PackRat guys. Another listmember reported to me this morning that
he'd tried loading the hex file, but had no luck getting it to work.
I've been wanting to dive more into Arduino...so I figured I'd write my
own interface program. The last software class I took was FORTRAN...and
then I did a little BASIC, so this C code stuff is all new to me and
it's been a real learning experience.
And I'm sure that a real program would probably look at my code and just
shake his or her head. :(
Thankfully...I've found some really good example code on the web. The
serial input engine is lifted from here pretty much intact:
<http://jhaskellsblog.blogspot.com/2011/05/serial-comm-fundamentals-on-arduino.html>
And is working perfectly as best I can tell. The serial port on the
TruePosition is going right into the serial port (pins 1 and 2) on the
Uno thru a resistor level-shifter on the TX port (because the arduino is
5 volts...the trueposition is 3.3v...but the 3.3V TX is being read by
the 5V arduino w/o any problems.) Using the hardware port is non-ideal,
as I've got to remove the jumpers to the TruePosition in order to upload
code to the Arduino, which also means that I can't use the built-in
Serial Monitor to view what my code is doing.
Thankfully...the software serial library allows you to create serial
ports on other pins...so while the True Position is on the hardware
serial, pin 11 is providing the debugging output.
(I may flip this around where SoftwareSerial is talking to the
TruePositon, and the hardware serial pins get freed up)
The parsing engine is also based on JHaskell's work here:
<http://jhaskellsblog.blogspot.com/2011/06/>
But is heavily modified with if-then-else string compares as the parsing
depends on what sort of message has been received. This took a bit of
brain work, as I couldn't get the compare function to work right at first.
Next up...I've got to figure out how to convert GPS seconds into date
and time...then I'll move along to the display and a rudimentary menu
system as I think one part will be time/date/status...and another page
will be GPS satellites...
thanks much and 73,
ben, kd5byb
_______________________________________________
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.