Hello everybody,
I'm relatively new to programming in general. I have an Arduino Micro and want to make a usb joystick controller where one of the axis is used by an hall effect sensor.
I have an TLE 4905L hall effect sensor (Datasheet: https://www.distrelec.nl/Web/Downloads/90/5l/ortle4905l.pdf)
I used a code from somebody else. This code was intended to use with a 10k potmeter (slider):
#include <Joystick.h>
void setup()
{pinMode(A0, INPUT);
Joystick.begin();}
const int pinToButtonMap = A0;
void loop()
{int pot = analogRead(A0);
int mapped = map(pot,0,1023,0,255);
{Joystick.setThrottle(mapped);}}
I want to convert this code to use with my hall effect sensor. Can someone help me in what I need to change in the code for it to work with the hall sensor. Many thanks.