Does anyone on here know if the capacitor-resistor combo attached to a pwm output pin of an Arduino gives a decent analog output?

@MLE_online I'm gonna some assumptions and say hell yes.

Whatcha cooking up this time?

@ArchiteuthisFlux I have an idea I want to try on this new ebike project. The motor controllers for these things have nice throttle response, but the pedal assist sensor response is just on-off. I was thinking I would try using an arduino to read the speed the pedals are turning from the pedal assist sensor and then generate a 0-5V throttle signal.

I want to see if I can make it so the bike provides an amount of throttle that corresponds to how much pedaling you're doing

@MLE_online Oh sick. I always thought it was weird that ebikes didn't work that way by default.

Like @stargirl said, a throttle signal like that is the least demanding analog output ever and could be done on pure vibes. I would put a little pot on it that you multiply with the pedal signal in the analogWrite() and then just twiddle it while riding until it feels right.
Because doing math is for nerds.

@ArchiteuthisFlux @stargirl I was thinking exactly something like that!

I don't understand why they don't work that way. They clearly can provide a variable amount of throttle, but someone at some point decided that the pedal assist shouldn't work like that and then every factory in China that makes these controllers did it the exact same way.

@MLE_online @stargirl I wonder if that has something to do with the ridiculous number of laws around ebikes in some places.

"God forbid people just move the throttle and it goes, they must also be perfomatively moving their feet in circles for some reason."

@ArchiteuthisFlux @stargirl maybe? just pretend to be doing something with your feet and you get to go full speed