Bike Cadence/RPM displayed via Raspberry Pi 3 on Pimoroni Blinkt
Hi,
I want to make a cadence/RPM -Raspberry Pi based LED display mounted on my handle bar so I can see my RPM while mountainbiking.
It needs to switch different Led light patterns according to Rpm on the MetaWear RG / Raspberry Pi base.
I have bought a Metawear RG development board sensor and downloaded your "MetaWear Python SDK for Debian".
Now I am struggeling to get the data from the sensor usable on a Raspberry Pi.
The sensor connects via Bluetooth (I get the LED to blink Green as proof).
I tried to run various scripts on the Pi and failed to get a read out.
I Do get a read out via ios and Win10 development app btw.
Can you help us getting some signals out (i'm pretty much a noob on the Pi)?
This is the hardware I have atm:
* Raspberry Pi 3 running Debian Jessie + Metawear + Pimoroni installed
* Metawear RG development board (casing I will 3D print myself for mounting under the pedal or on the Crank)
* Pimoroni Blinkt (8-LED Hat)
* 5V powerpack to power the RPi for a Day (or more) but still need to buy it
I need:
Idle / 0-RPM -> program 1 (PRg1.py) will be sleep mode or 1 Red blinking every 3 sec
Peddling -> program 2 (PRi2.py) will be startup patterns with random blinking and Rainbow for 5 Sec
Rpm 1-15 -> program 3 (PRi3.py) still to create / adjusted Larson/Solid "White"
Rpm 16-30 -> program 4 (PRi4.py) still to create / adjusted Larson/Solid "Red"
Rpm 31-45 -> program 5 (PRi5.py) still to create / adjusted Larson/Solid "Yellow"
Rpm 46-60 -> program 6 (PRi6.py) still to create / adjusted Larson/Solid "Green"
Rpm 61-75 -> program 7 (PRi7.py) still to create / adjusted Larson/Solid "Blue"
Rpm 76-110 -> program 8 (PRi8.py) still to create / adjusted Larson/Solid "Purple"
The PRi*.py programms can be re-writed/adjusted Pimoroni programs like my 1st thought above.
Thanks in Advance,
Ramasen
Netherlands
This discussion has been closed.
Comments
The trick was to use pybluez instead of pygatt.
X-Y-Z axes give data in -1 / +1 range for 5 - 10 seconds
Now i need to find out how to translate the data into 4 pulse per turn (+x<-> -x and +y <-> -y shifts maybe?).
From that pulses calculate RPM/cadence, or is there a api / Py lib ready for that?