Reply to comment

Bike speedometer

Battery usage Today I've found some time to write a draft version of software part for a bike speedometer. As far a I could found a good example for getting data from microphone using GStreamer in python, this version is written in python. I don't think, that it is a good language for such applications so I would rewrite it in C or C++. It is not optimized too, because half of the script was written directly on the phone while riding on a bike.
What else can be said. It works. Sometimes impulses from sensor are missed, but this should be problem with sensor or wrong threshold in my script. And this is quite rare situation. Image on the right shows battery usage. From 18:00 till 19:00 bike.py was running with navit. At 19:00 I've closed navit and at 19:30 I've switched off screen to test, how much electricity screen uses. At 20.00 I've switched bike.py and phone started to discharge a little bit slower (but for unknown reason Battery graph registered dramatic decrease of battery and then it's level raised to normal value, through I didn't charge the phone).
Red and cyan are battery level and magenta is CPU usage.
P.S. Don't expect much now. This is just a small command line application, which prints your speed.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.