Pharos iGPS-500 GPS Clock
The primary purpose of this project is to demonstrate how to use a Pharos iGPS-500 or Pharos GPS-360 receiver with GHI’s Premium library’s USB host support.
A clock, based upon GPS messages, was implemented. The provided code runs on an EMX based board with a LCD display. The same code was used, with appropriate reference changes and a different display device on a FEZ Domino. The only requirement to using this code is a device which has USB host support.
The code supports daylight saving time in the USA, and the local time differential from UTC is hardcoded.
At the present time, there are difficulties running this code under Gadgeteer. Gadgeteer USB host support does not provide a way to get access to a device which it does not recognize. If the USB host module is not included in the Gadgeteer designer, there are still problems with getting the USB host device connected event, which is required for this code to run.
I have to figure out what happened to the image I attached!
Video of clock is not too interesting.
I have another posting with pictures.
Any progress on this project? I have a similar project that requires a hardware clock connection (probably serial) rather than USB in order to get a higher degree of accuracy.
What progress are you looking for?
I used this code in 4.2 with a fez cobra and a external USB GPS.
Now i need to upgrade to 4.3 and i’m stucked in this part, under UsbSerialConnected:
// we need to "recast" the device as a Prolific serial device
GHI.Premium.System.USBH_Device unDevice = new GHI.Premium.System.USBH_Device(device.ID, device.INTERFACE_INDEX, GHI.Premium.System.USBH_DeviceType.Serial_Prolific,device.VENDOR_ID, device.PRODUCT_ID, device.PORT_NUMBER);
serial = new USBH_SerialUSB(unDevice, 4800, Parity.None, 8, StopBits.One);
serial.ReadTimeout = 700;
Can anyone help translating this part to 4.3?
Hum… i tried the serial section but with no luck, it never reaches the Controller_UsbSerialConnected event.
Other examples are for keyboard and mouse, not for GPS.
@ geologic - You want to look into the UnknownDeviceConnected event and construct a new UsbSerial object with the parameters in that event. https://www.ghielectronics.com/docs/36/usb-host#3300 discusses that event.