Skip to content

rvadhavk/ble-angle-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BLE Angle Guide

screnshot of the gui showing angle readings

This project is my attempt to create a BLE knife sharpening angle guide/sensor that magnetically clips onto the side of your knife. The UI is a webpage which talks to the sensor using WebBluetooth. The hardware is a custom PCB based around a Panasonic nRF52840 module. The firmware is implemented in Rust using Embassy. It's my first foray into embedded systems, so the PCB design is probably terrible.

Project Structure

  • hardware/: KiCad files for the PCB
  • firmware/: Rust firmware for the nRF52840 module
  • ui/: Web-based UI (just an index.html file)

Building the Firmware

The board has 1.27mm/0.05" pitch 2x5 pads which can be connected to using something like https://www.adafruit.com/product/5434. For anyone wanting to develop something similar, a 10 pin connector is unnecessary; all you need is 4 pins: SWCLK, SWDIO, GND, and VCC.

To build and debug, run cargo run --release from the firmware directory. Note: the CPU seems to hardfault after some time if running without the --release flag. I haven't figured out why yet; I'm guessing it has to do with a stack overflow.

To flash the device, run sh flash.sh from the firmware directory.

UI

The UI is just a single index.html file. WebBluetooth requires an https connection, so development-server.py is included for running a simple HTTP server with TLS support. It requires that mkcert be installed or that you manually generate cert.pem and key.pem.

Known Issues

  • On/off button logic hasn't been implemented yet in the firmware
  • USB connector is currently unused in firmware

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published