Go Down

Topic: Stationary bike record .GPX data help need (Read 250 times) previous topic - next topic

aidept

Hello.
I have an old stationary bike with cyclometer broken also.
Any idea how to use the cadence sensor (a simple switch) with a development board and from the final project to get a valid like .GPX to import in Strava or any other riding android app?

I am not interested about GPS points, of course (I am pedaling in my house), only cadence, speed, time.

Anyone can help me with a general idea of what I need for this?

For now I have an ESP8266+Wifi board and I have knowledge about the hardware+software part, this means I know how to read the sensor input and write the info on file, via WiFi, on a local web server.
But making a valid .GPX file, which will be accepted on import in a like-Strava app, is beyond my power.

Any help would be very appreciated! Thank you.

Peter-CAD-HST

Hello aidept
How are you?
Take a look here.
With best regards
Peter
and stay healthy
KISS Q&D - keep calm and carry on - mind the gap - beware of sharks! -

aidept

Thanks. I was there. Didn't found info about my particular project which not involve GPS but only distance and speed.

KASSIMSAMJI

#3
Sep 12, 2020, 12:11 pm Last Edit: Sep 12, 2020, 12:12 pm by KASSIMSAMJI
Hello,

 There is a work around that I was able to export txt/csv file off a web page

the file actually holds records of sensor readings and date/time, and this is a JS script that I did use (hosted on the ESP)

Code: [Select]

function downloadFile(fileName, fileContent , fileExtension ) {  // TXT/CSV
  var element = document.createElement('a');
  element.setAttribute('href', 'data:text/' + fileExtension + ';charset=utf-8,' + encodeURIComponent(fileContent));
  element.setAttribute('download', fileName);
  element.style.display = 'none';
  document.body.appendChild(element);
  element.click();
  document.body.removeChild(element);
}  // end


for your case your content will populate all your needed data and  well formatted as per this sample here   https://en.wikipedia.org/wiki/GPS_Exchange_Format

and your fileFormat should be gpx(GPX)

Give it a shot, It might just work
Electrical Engineer

aidept

Thank you very much, but I am not advanced enough to understand how this work. But I will study. Any clues what to learn will be greatly appreciated!

aidept

Ok, I can send data from Arduino to my PC. In a text file.
But I am not a Web programmer and dont know how to get data from that text file and put in a .GPX file recognozible by a fitness app to Import.
Any clues?
Someone here using a modern stationary bike or treadmill which export data on USB?
I need to see how a .GPX file look in this particularly case, with no locations.
Thank you, please help.

KASSIMSAMJI

Ok, I can send data from Arduino to my PC. In a text file.
But I am not a Web programmer and dont know how to get data from that text file and put in a .GPX file recognozible by a fitness app to Import.
Any clues?
Someone here using a modern stationary bike or treadmill which export data on USB?
I need to see how a .GPX file look in this particularly case, with no locations.
Thank you, please help.
post your sketch please, within code tags
Electrical Engineer

Go Up