Collecting GPS and speed data via USB Power

Inquiry and support for Freematics products
Post Reply
ChrisF
Posts: 5
Joined: Wed Oct 12, 2016 2:39 am

Collecting GPS and speed data via USB Power

Post by ChrisF »

Does anyone know if it's possible to collect USB and speed data while connected to micro USB power and not the OBDII port? I've tried this in my vehicle but do not see any new logs created.
mikebolt
Posts: 19
Joined: Sat Sep 24, 2016 3:12 am

Re: Collecting GPS and speed data via USB Power

Post by mikebolt »

Maybe. I have gotten it to log to the SD card via USB power. I even tried logging the raw GPS NMEA messages. They were properly formatted, but they had no valid data except for the UTC timestamp. Weird.

Not sure about accelerometer or gyro. I didn't try those.
mikebolt
Posts: 19
Joined: Sat Sep 24, 2016 3:12 am

Re: Collecting GPS and speed data via USB Power

Post by mikebolt »

Yes, this is possible. I got it to work connected to a laptop outside.

However, you will have to modify the datalogger sketch. When not connected to OBD, it will call the "init" method every iteration of the main loop. When there's no OBD connection this method takes over 5 seconds. This makes data collection very slow. All you need to do is remove the "else" block from lines 307 to 315 in datalogger.ino. I also added some code to make it retry the OBD connection a few times at the start as a compromise.

Everything except OBD should work on USB power.

Does it not create a new log file, or is the new log file empty? What does it print in the serial console when you try this?
Post Reply