A racing lap timer, based on a laser sensor.
For line follower competitions a racing lap timer shall be used. It doesn't only measure the lap time, it shows it nice via web interface, inclusive automatically result table generation.
If the system starts up the first time, it will spawn a wifi access point with the SSID RacingLapTimer. Connect to it, it will request a password (default: "let me in"). Configure there the wifi network SSID/password to which the system shall later connect.
After configuration, the system will try to establish a connection. If the connection is not successful, the access point will be spawned again. Otherwise the credentials will be stored to persistent memory and loaded the next time automatically.
Schematic files can be found here. These have been developed using KiCAD 6.
- Digital signal of laser sensor is connected to D1/GPIO_5 of the Wemos D1 Mini.
- Power is supplied by USB 5V directly to the Wemos D1 Mini
- Laser module Vcc shall be 3.3V, because MCU is only 3.3V tolerant.
- THT or SMD resistor options are provided. DO NOT PLACE ALL RESISTORS.
- Pin header for Waveshare Laser Sensor.
- It is recommended to give the Laser Sensor some kind of support in order to protect the pin header from breaking. The height of the support depends on the pin headers used.
Install the serial driver for the Wemos D1 Mini board. Find the latest drivers here: https://www.wemos.cc/en/latest/ch340_driver.html
The PlatformIO IDE is used for the development. Its build on top of Microsoft Visual Studio Code.
- Install VSCode.
- Install PlatformIO IDE according to this HowTo.
- Close and start VSCode again.
- Recommended is to take a look to the quick-start guide.
- Load workspace in VSCode.
- Change to PlatformIO toolbar.
- Project Tasks -> Build or via hotkey ctrl-alt-b
- Connect the Wemos D1 Mini board to your PC via USB.
- Build and upload the software via Project Tasks -> Upload.
- Build and upload the filesystem via Project Tasks -> Upload File System image.
- Arduino - ESP framework.
- WifiManager - ESP8266 WiFi Connection manager with fallback web configuration portal.
- WebSockets - A WebSocket Server and Client for Arduino based on RFC6455.
If you have further ideas or you found some bugs, great! Create a issue or if you are able and willing to fix it by yourself, clone the repository and create a pull request.
The whole source code is published under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.