Terry Pratchett once said “Wisdom comes from experience. Experience is often a result of lack of wisdom.” This is as true with technical skills as it is with the rest of life, and you won’t truly understand a specific topic unless you’ve struggled with it a bit. [publidave] wanted a simple wireless display for a bluetooth cycling cadence sensor, and soon found himself deep down the rabbit hole of Micropython and Bluetooth Low Energy on the ESP32.
[publidave] had converted his bicycle for indoor training during lockdown and winter, and realized he can’t use the guided training app and view his cadence simultaneously, so he needed a dedicated cadence display. Since [publidave] was comfortable with Python, he decided to give Micropython on the ESP32 ago. Bluetooth Low Energy can be rather confusing if you haven’t implemented it before, especially if good examples are hard to come by. In short, the ESP32 needs to find the sensor, connect to it, select the right service, and listen for the notifications containing the data. The data is then converted to RPM and displayed on a small OLED display. [publidave] does an excellent job of describing what exactly he did, highlighting the problems he encountered, and how he solved them.
In the end, he had a functional display, a good idea of what he would do differently next time, and a lot of additional knowledge and understanding. In our book that’s a successful project.
Since so much of the health related devices work with Bluetooth Low Energy, it could be handy to know the technology and how to interface with it. It would allow you to do things like unbrick a $2000 exercise bike,
wisdom comes from making mistakes, assuming you learned from said mistake
We are developing as OpenSource a wireless EBike module and also a wireless remote, that follow the EBike and cycling sensors standards of ANT as also Bluetooth. Our wireless system integrate well with the wireless cycling GPS displays like Garmin Edge since they use the ANT standards. It is easy to see on this wireless displays our EBike data like motor power, cadence and pedal power, as also our hear rate graph (measured on the smart watch and sent wireless) and the GPS navigation!! — see how to build fro free on our project page:
https://opensourceebike.github.io/
Where are all the comments about how lousy the OLED frame is? ;-)
Only 3D printed cases receive all the hate!
Never underestimate the anti-theft security of “ugly”.
This is a frustrating limitation of BLE that isn’t present in ANT+, which makes ANT+ a lot nicer for hop-on-and-go cycling where you might have a series of different sensors and a series of different receivers. ANT+ you just need to know the serial of the device (found in discovery), then its just listening for a broadcast. Means you can have your GARMIN on your handlebars, ZWIFT on the PC, and get the same data on both.
Some of the HRMs now have both BLE and ANT+ (and sometimes the odd one they use for gym equipment…), which is really handy as it will ink to both a fitness watch and Zwift / GARMIN / Whatever else at the same time.
BLE device can work perfectly well as broadcast-only. The only drawback is that AFAIK there’s no standard way to present things like temperature, velocity, cadence etc. in advertisement data. And apparently major manufacturers don’t care enough to come up with some open specification of “vendor-specific” advertisements.
I see a lot of comments about ANT and ANT+, which I do agree in small meshes is much more superior to BLE, so I’m going to leave these here.
https://github.com/cujomalainey/ant-arduino
https://github.com/cujomalainey/antplus-arduino
Mmh why? A gps speedometer with ant+ aka xoss g+ is to get for 30 Euro and can more