Coder Social home page Coder Social logo

pimentoso / mini4wdchrono Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 1.0 12.27 MB

Software for Arduino based 3-lane lap timer for Tamiya Mini4wd.

License: MIT License

JavaScript 73.40% HTML 24.60% CSS 0.59% Shell 0.86% PowerShell 0.55%
arduino electron johnny-five lap-times tamiya-mini4wd

mini4wdchrono's People

Contributors

dependabot[bot] avatar pimentoso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

nguerrini

mini4wdchrono's Issues

Allow for 2 RGB LED strips

Allow another RGB strip to be active on the second LED pin. So you can put a second LED strip in front of the lap timer for everyone to see.

Check for updates automatically with Github API

API endpoint:
https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/latest

Sample output:

{"url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/31844547",
 "assets_url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/31844547/assets",
 "upload_url"=>
  "https://uploads.github.com/repos/Pimentoso/mini4wdchrono/releases/31844547/assets{?name,label}",
 "html_url"=>"https://github.com/Pimentoso/mini4wdchrono/releases/tag/0.13.3",
 "id"=>31844547,
 "node_id"=>"MDc6UmVsZWFzZTMxODQ0NTQ3",
 "tag_name"=>"0.13.3",
 "target_commitish"=>"master",
 "name"=>"v0.13.3 - 2020/9/26",
 "draft"=>false,
 "author"=>
  {"login"=>"Pimentoso",
   "id"=>6085909,
   "node_id"=>"MDQ6VXNlcjYwODU5MDk=",
   "avatar_url"=>"https://avatars2.githubusercontent.com/u/6085909?v=4",
   "gravatar_id"=>"",
   "url"=>"https://api.github.com/users/Pimentoso",
   "html_url"=>"https://github.com/Pimentoso",
   "followers_url"=>"https://api.github.com/users/Pimentoso/followers",
   "following_url"=>
    "https://api.github.com/users/Pimentoso/following{/other_user}",
   "gists_url"=>"https://api.github.com/users/Pimentoso/gists{/gist_id}",
   "starred_url"=>
    "https://api.github.com/users/Pimentoso/starred{/owner}{/repo}",
   "subscriptions_url"=>"https://api.github.com/users/Pimentoso/subscriptions",
   "organizations_url"=>"https://api.github.com/users/Pimentoso/orgs",
   "repos_url"=>"https://api.github.com/users/Pimentoso/repos",
   "events_url"=>"https://api.github.com/users/Pimentoso/events{/privacy}",
   "received_events_url"=>
    "https://api.github.com/users/Pimentoso/received_events",
   "type"=>"User",
   "site_admin"=>false},
 "prerelease"=>false,
 "created_at"=>"2020-09-26T15:10:39Z",
 "published_at"=>"2020-09-26T15:14:04Z",
 "assets"=>
  [{"url"=>
     "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/assets/26225611",
    "id"=>26225611,
    "node_id"=>"MDEyOlJlbGVhc2VBc3NldDI2MjI1NjEx",
    "name"=>"Mini4wdChrono-mac.zip",
    "label"=>nil,
    "uploader"=>
     {"login"=>"Pimentoso",
      "id"=>6085909,
      "node_id"=>"MDQ6VXNlcjYwODU5MDk=",
      "avatar_url"=>"https://avatars2.githubusercontent.com/u/6085909?v=4",
      "gravatar_id"=>"",
      "url"=>"https://api.github.com/users/Pimentoso",
      "html_url"=>"https://github.com/Pimentoso",
      "followers_url"=>"https://api.github.com/users/Pimentoso/followers",
      "following_url"=>
       "https://api.github.com/users/Pimentoso/following{/other_user}",
      "gists_url"=>"https://api.github.com/users/Pimentoso/gists{/gist_id}",
      "starred_url"=>
       "https://api.github.com/users/Pimentoso/starred{/owner}{/repo}",
      "subscriptions_url"=>
       "https://api.github.com/users/Pimentoso/subscriptions",
      "organizations_url"=>"https://api.github.com/users/Pimentoso/orgs",
      "repos_url"=>"https://api.github.com/users/Pimentoso/repos",
      "events_url"=>"https://api.github.com/users/Pimentoso/events{/privacy}",
      "received_events_url"=>
       "https://api.github.com/users/Pimentoso/received_events",
      "type"=>"User",
      "site_admin"=>false},
    "content_type"=>"application/zip",
    "state"=>"uploaded",
    "size"=>74385630,
    "download_count"=>0,
    "created_at"=>"2020-09-26T15:12:36Z",
    "updated_at"=>"2020-09-26T15:13:58Z",
    "browser_download_url"=>
     "https://github.com/Pimentoso/mini4wdchrono/releases/download/0.13.3/Mini4wdChrono-mac.zip"},
   {"url"=>
     "https://api.github.com/repos/Pimentoso/mini4wdchrono/releases/assets/26225753",
    "id"=>26225753,
    "node_id"=>"MDEyOlJlbGVhc2VBc3NldDI2MjI1NzUz",
    "name"=>"Mini4wdChrono-windows.zip",
    "label"=>nil,
    "uploader"=>
     {"login"=>"Pimentoso",
      "id"=>6085909,
      "node_id"=>"MDQ6VXNlcjYwODU5MDk=",
      "avatar_url"=>"https://avatars2.githubusercontent.com/u/6085909?v=4",
      "gravatar_id"=>"",
      "url"=>"https://api.github.com/users/Pimentoso",
      "html_url"=>"https://github.com/Pimentoso",
      "followers_url"=>"https://api.github.com/users/Pimentoso/followers",
      "following_url"=>
       "https://api.github.com/users/Pimentoso/following{/other_user}",
      "gists_url"=>"https://api.github.com/users/Pimentoso/gists{/gist_id}",
      "starred_url"=>
       "https://api.github.com/users/Pimentoso/starred{/owner}{/repo}",
      "subscriptions_url"=>
       "https://api.github.com/users/Pimentoso/subscriptions",
      "organizations_url"=>"https://api.github.com/users/Pimentoso/orgs",
      "repos_url"=>"https://api.github.com/users/Pimentoso/repos",
      "events_url"=>"https://api.github.com/users/Pimentoso/events{/privacy}",
      "received_events_url"=>
       "https://api.github.com/users/Pimentoso/received_events",
      "type"=>"User",
      "site_admin"=>false},
    "content_type"=>"application/x-zip-compressed",
    "state"=>"uploaded",
    "size"=>72338418,
    "download_count"=>3,
    "created_at"=>"2020-09-26T15:23:12Z",
    "updated_at"=>"2020-09-26T15:24:34Z",
    "browser_download_url"=>
     "https://github.com/Pimentoso/mini4wdchrono/releases/download/0.13.3/Mini4wdChrono-windows.zip"}],
 "tarball_url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/tarball/0.13.3",
 "zipball_url"=>
  "https://api.github.com/repos/Pimentoso/mini4wdchrono/zipball/0.13.3",
 "body"=>
  "- Renew some elements of the interface.\r\n" +
  "- Automatically scroll down interface when race is started to show times better on small screens."}

Fix final mode

Final mode should behave differently

  • times should be calculated the same way as normal mode
  • first person to complete 3 laps wins, regardless of time

Use digitalWrite for buzzer instead of Piezo object

It's meaningless to use the Piezo lib for an active buzzer that can only output 1 note. Use this

board.on("ready", function() {

    this.pinMode(3, five.Pin.OUTPUT);
    this.digitalWrite(3, 1);
    this.wait(1500, function() {
        board.digitalWrite(3, 0);
    });
});

Allow switching between races

Prerequisite: #22

After races are saved each in a different file, we can have a function to switch between active races to allow multiple races to be ran the same day (different categories on the same track)

  • Need to add a modal that asks for a race name when creating a new race

  • Need a menu that lists races reading the files in the folder

  • Maybe have an electron menu with a dropdown with recent files

  • Implement a direct file>open function later

Handle board connection errors

  • top tag: show 'connecting' at first
  • top tag: show 'error' on connection error (board.on('error'))
  • on error, show a dialog with the message

Use physical button to stop race

If the race is running, pressing the button should stop it. This is to speed up things when all 3 cars go out of track and the lap timer waits a bit before automatically stopping the race.

Add option to invert direction

  • add a checkbox in configuration page
  • it should swap sensor 1 and 3
  • it should also reverse direction of LED strip animation

Reset UI in race mode after loading tournament

To reproduce

  • load track
  • play a free round
  • load tournament
  • return to race mode, times will not be 0

Take care the behavior of loading an existing race from configuration on app launch is not impacted

Stop race button during race

Needed because waiting for the time threshold to expire can be long.
When pressed, if some timer is running, it will be set to 99999

offline version.

Hi Michele, greetings from Mexico.

Is there a way to create a completely offline layout and tournament, or a full version of the mini4wd chrono so as not to depend of the Online editors ???

Thanks in advance.

Scroll down UI when round is started

Consider adding a min-height to the 3 column in race mode, and automatically scroll page to bottom when round is started, so the split times are visible without having to scroll manually

Add multiple race speed presets with fast switch

Use case: same track can be used on the same day for different categories (stock, expert, top)

  • need a function to save a speed value in the setup tab (with a name)
  • also a delete button next to each saved one
  • in the race tab, need a UI element to switch between presets on the fly (only if more than 1 present)

Integrate Google Spreadsheet API to save race information in real time

Use case: during a race, at the end of each round the race data is uploaded on a Google Spreadsheet which is refreshed with new data. All the racers can have access to it to check times and manches in real time.

What's needed

  • A Google access token. A new button is needed to call the Google OAuth to get a token with the correct authorization. The token is then stored in the program configuration for reuse.
  • A new button to start recording data for the current race. A new spreadsheet is created, and the link to it is displayed in the program. Maybe have a QR code too for easy access for the players.
  • After each round the spreadsheet is emptied and refreshed with the new data. Data includes the player view and the manches view (maybe on 2 different sheets?)

Detect fake start of cars

Software should detect cars that pass under the lap timer while the start sequence is beeping, and set them to 99.999.

Laser diode

Ciao!
Could you link me a laser diode model?
The Link inside the hardware list is expired.
Thanks a lot
Fabrizio.

Mini4wd Chrono building help

Hi Michele
I'm attempting a build of the mini4wd chrono for our local club and I have
some questions. I have some basic understanding of electronics, but I need
clarification on the wiring diagram.

  1. please confirm - resistors on the green LEDs are 220 ohm

  2. the Photo sensor TEMT6000 has 3 connections. In the photos I can see 3
    wires going to it, but on the circuit diagram there are only 2 and it does
    not say where to connect them - OUT, GND or VCC

  3. is the resistor for the photo sensor 10K ohm? Is that right for the
    TEMT6000 and which of the 3 connections is it connected to?

  4. what are the green LEDs for? I can't see reference to them in the
    documentation. Do they turn on to start the race?

  5. I've got the laser diodes. I guess that these are powered the whole
    time. Can I plug these straight into the 5v power pin on the arduino? Do
    I need any resistors inline with these?

thanks for your help.

We're excited to have this running for our races.

thanks

Mark (from New Zealand)

On Sun, 12 Jan 2020 at 03:36, Michele Ferri [email protected]
wrote:

Closed #44 #44.

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Pimentoso/mini4wdchrono/issues/44?email_source=notifications&email_token=AKHJUZ7YNVHPNACVIXOFYUDQ5HKPXA5CNFSM4KFEXDZ2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOV5DLQHY#event-2940647455,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKHJUZYIJKVSRY6JIJK5NBLQ5HKPXANCNFSM4KFEXDZQ
.

Originally posted by @markinNZ in #44 (comment)

Save races in different JSON files

  • Race data get saved into a different nconf file instead of the configuration one. This includes tournament, track, times etc
  • Race name is asked when user selects 'new race', and json file is saved - {timestamp}.json
  • All race files are stored in a subfolder
  • On program startup, the latest file is autoloaded
  • Makes for future loading function to see old race data

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.