Throttle Correction by qwertbochaffer

Cloned from Sketch AnalogWrite_Fix by qwertbochaffer

This sketch is missing a short description
This code is being used to fake a 0-5V output using the analogWrite() function which will be used to control the throttle position of an Alltrax AXE 4844 ESC due to the need to rectify the signal sent from a cheap Hall Effect pedal. The original signal from the throttle is between 14% and 80% or 0.9V and 4.3V. The corrected signal transitions linearly from 0% to 100% despite being a PWM wave from analogWrite(). The pedal is wired between a 5V source, and ground, with the signal wire from it connected to an Analog pin dubbed inputPin (here, A0). The output signal originates from outputPin and can be any PWM enabled pin.

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:274491" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>