Giter Club home page Giter Club logo

pedal.guru's Introduction

Pedal Guru

Pedal Guru (former OpenCC) is an open-source DIY project with the intention to bring useful resources that are appreciated by cyclists to easy-to-work platforms like Raspberry Pi and RP2040, in a more organized manner than usual apps offer us. The intention is to include integration with some popular services.

Note:

This project is under active develpment. The documentation is growing along the project as it's a work-in-progress. If interested, please check the development board and the reference diagram.

Hardware

This very first iteration of the project was based on the following devices:

1.28inch LCD Module

Raspberry Pi Zero W

Now, we're including the following embedded device:

  • RP2040-LCD-1.28, from WaveShare

RP2040-LCD-1.28_front RP2040-LCD-1.28_back

Software

  • The RP2040-LCD-1.28 doesn't need an additional OS, since it can run C and C++ code natively (aka "bare metal").

  • In order to be able to use Raspberry Pi Zero W, we need an OS (operational system) to run our software on.

At this moment, we choose to use TinyCoreLinux, due the following reasons:

  • It's "frugal" install, the system loads itself into RAM from storage and executes from there. This way, we have a fresh start on each boot and the system is not susceptible to data loss from improper shutdown (we can actually just unplug the battery with no harm);
  • Straightforward: boots right to the prompt with the default user logged in with enought resources to load the interface, have internet access, use GPIO etc.;
  • Startup time gets quite low, with just a few seconds.

To use the GC9A01 based display on TinyCoreLinux, we need to follow this procedure.


@juliannojungle, 2022

pedal.guru's People

Contributors

juliannojungle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

edilsoncorrea

pedal.guru's Issues

Create project initial stucture

Create separate layers for:

  • GUI rendering
  • settings
  • pages
  • navigation
  • HID handling
  • devices handling
  • devices sensors handling
  • sensors protocols
  • data models
  • build targets
  • dependencies
  • integrations APIs

and so on.

Extract and serve bounding box from database, filtering by country, state and city

https://nominatim.openstreetmap.org/search?format=json&country=Brasil&state=RJ&city=Teresopolis

[
    {
        "place_id": 297625715,
        "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
        "osm_type": "relation",
        "osm_id": 2219098,
        "boundingbox": [
            "-22.4701917",
            "-22.1223827",
            "-43.047406",
            "-42.7110277"
        ],
        "lat": "-22.4164578",
        "lon": "-42.975194",
        "display_name": "Teresópolis, Região Geográfica Imediata de Petrópolis, Região Geográfica Intermediária de Petrópolis, Rio de Janeiro, Região Sudeste, Brasil",
        "class": "boundary",
        "type": "administrative",
        "importance": 0.5822562765652282,
        "icon": "https://nominatim.openstreetmap.org/ui/mapicons/poi_boundary_administrative.p.20.png"
    }
]

Map tiles not opening on TinyCoreLinux

Check why map tiles loads perfectly on Raspberry Pi OS and doesn't on TinyCoreLinux while starting via bootlocal.sh.

Console: FILEIO: [x.png] Failed to open file

On demand map tile loading, for fluid navigation

  • Converting tile x and y gives respectively the leftmost longitude and topmost latitude of the actual tile. Given x+1 and y+1 are the next tile topmost and leftmost coordinates, together they compose the actual tile's boundings. Calculate where is the actual latitude/longitude inside the tile based on that;
  • The actual latitude/longitude should be always at the center of the screen;
  • Tiles has 256x256 and the display has 240x240. Load next tile based on the displacement from the center (considering 8px negative padding);
  • There should be always 4 tiles loaded at a time, in a 2x2 grid arrangement;

Include an "update maps" button @ settings page

  • Include an "update maps" button @ settings page that opens the download page;
  • Create a download progress animation.

Elements:

  • Faded map on the background;
  • Progress ticks around the screen (like a ring);
  • QR code in the middle, pointing to the user settings webpage;
  • Warning to not leave the screen or shutdown the device, so the download is not interrupted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.