Allows one to easily port JLM reading/smoothing code and stack interfaces on top, regardless of the board. So long as said board has an Arduino core anyway.
#include <JLM.hpp>
JLM jlm;
char buf[512];
void setup()
{
jlm.begin(sampleRate, analogPinX, deadzoneX, reverseDeadzoneX, analogPinY, deadzoneY, reverseDeadzoneY, analogPinButton);
}
void loop()
{
jlm.sample();
// Do whatever with the inputs
}
Access the JLM readings through the attributes x, y, and the button() method.
- Button
- "Debouncer" for fast reversing