After modifying a USB GPS receiver to use with Arduino, I continued to make a further attempt to measure distance between two locations with Arduino. The idea is straight-forward, when pressing a key, current location is stored and used as start location. The line distance of current location and the start location is calculated and displayed on the LCD on the spot. Next steps are: (1) allowing entering GPS coordinates of a location (2) calculating and displaying trip distance.
If the distance between two locations is not too long, the calculation of the line distance between them can be simplified a lot by treating the earth as flat.
Most common USB GPS receivers come with a USB connector with a UART-to-USB chip built in. That means the GPS receiver itself provides serial UART output. So they can be used with Arduino by replacing it's USB connector with Rx/Tx and VCC/GND connectors. My practical test has proved that this works. What you need to make sure of is the baudrate of the GPS receiver.
USBASP is probably the cheapest programmer that can be used to program an Arduino and eliminate the need for a bootloader which occupies 2KB in the on-chip flash.
After being able to let Arduino access vehicle data through my Arduino OBD-II Kit, I was thinking of putting on a wireless module on the Arduino and transmitting the OBD-II data to a remote place. XBee is a good choice but its high-power version is rather expensive and difficult to obtain. I chose APC250 wireless module finally to make the attempt.
As I’ve wrote a program on PC to display OBD-II data from USB and Bluetooth ELM327 adapter in the past, it doesn’t take me a lot time to modify it to receive data from a APC250 module plugged on a small TTL-to-USB adapter. Actually to a PC program, communication with APC250 is just plain serial port communication. Arduino connects with the other APC250 module. I connect the Rx and Tx pins to Arduino’s D2 and D3 ports and use SoftwareSerial to perform serial communication as the hardware UART is used to retrieve data from OBD-II UART adapter.
There is no technical difficulty as long as the wireless modules can talk to each other in transparent serial communication, but it’s fun and possibly useful to send out the vehicle data to a remote place which can be up to 1.8km with this APC250.