Bicycle speedometer

You can try FemtoIDE, for example. That’s what I’m using.

Once you have that installed, just unzip the cyclometer code into FemtoIDE/projects/Cyclometer folder, start FemtoIDE and choose Cyclometer project from the list.


Here’s the modified design. The axles don’t go through the Pokitto connectors as easily as you’d think though. Fitting is really tight and I think the bush parts at top of axles are not actually needed. I haven’t done any field tests yet because of this exceptionally warm and wet winter/prolonged autumn, but the design feels secure and removing Pokitto is slightly easier and smoother than with the pegs.

1 Like

Another option, don’t know if you have them, is the small rod like pieces that are smooth, like used for the StarWars Lego Lightsabers.

I don’t have those, but that could also work. It seems that there is even a part that connects technic axle and a rod in 90 degree angle, so it would nicely attach to the horizontal axles.

1 Like

I know it’s asking a lot how do I use it? Is all the code in one lump or small parts?

I’m not sure I understand what you are asking. The cyclometer code is divided in several files.

I have no idea how to compile the US version I know it is a lot to ask but can you instruct me how to do it? unless you have it already compiled.

There is a precompiled binary (Cyclometer-US.bin) in the zip file I provided.
Here: Cyclometer-US.zip

It’s got wheel circumference changed to 2153 mm if that’s closer to what you have. I can of course compile another one if that’s not correct.

Or if you want to compile it yourself, in FemtoIDE just choose ‘Build’ from Build menu or hit control-b. It will create Cyclometer.bin in the project’s folder.

1 Like

Thank you! I’ll dl it and install it on pokitto tomorrow.

Finally got to install it, it is nice, Thank you, I just need to make my “sensor” and mount it, went out for a short ride the other day, (down the road and back) and there are a lot of recreational cyclists who ride my road one hollered (yes Im southern lol) and we stoped and talked a bit he showed me how to best adjust my brakes, assured me that I could change out the stem on it then commented that his brand new bike was several pounds heavier,
soon as my project box gets here I can finish the “dashboard” for the Cylon eye on front and yes Im Liberating the pegs from my sons lego box to mount Pokitto.

2 Likes

not sure what I’ve done bt it doesn’t seem to be reacting to the magnet

I tested the switch with a simple led and it works, but the pokitto doesn’t seem to see it

I get the feeling that one on the bike in the pic is actually a Hall effect senso and not a reed switch :disappointed_relieved:
And the Hall effects I ordered have not shipped yet

That looks like a reed switch in the picture. If you have connected it correctly between 3V3 and EXT0 pins on Pokitto, then I have no idea what could be the problem. I tested the Cyclometer US version binary and it works for me.

You could try replacing the reed switch with a manual switch or just a wire that you connect and disconnect by hand, but clearly your picture shows that the reed switch is working.

1 Like

Tried a momentary button, but nothing happened as I pressed it, I even used two jumpers and just tapped them together. I bet mine mah have something wrong with it. lol

@jonne get me another pokitto ready lol. White back and buttons transparent pink front. When tax refund is issued I’ll need another probably.

2 Likes

I would try editing and re-compiling the code to use a different input, and wire the switch to this new input. If it works, then the original input is likely bad. If it still doesn’t work then it’s probably that you’re wiring it wrong.

I have no idea how to compile the code unfortunately, I believe it may be my pokitto I need to test it to see it the header is good

I’m getting 3.2 volts on the pin and .31 when it’s wired up for the sensor.
I tried setting the polarity one way them the other but nuthing.

Also tried the metric version and got no response with it either.

The program sets an internal pull-down resistor on the EXT0 pin, so you should normally get 0 volts, and 3.2 volts only when the reed switch is connected and you bring magnet next to it.

I tried to make a version that uses other pins as input but strangely it didn’t work. The pull-down resistors seem to be activated correctly but my program receives no interrupts from pins other than EXT0.

It’s probably my pokitto

Let me take a look at this and get back to you

It is highly unlikely, that a single pin is not working on an otherwise functional pokitto - though it is possible

1 Like

To verify the hardware, it would be best to have a simple program that sets a pin to input mode with pulldown and then polls it continually and outputs its state to the display. You could do this for more than one, or all, the PEX inputs at the same time.

Anything you need me to do?

Wait patiently. I was kinda busy. I will get back to this soon

1 Like