Hey all,
So i just got the joystick and it has x- and y-axis and an z-axis (rotating the top). So i have 3 potentiometers, which output a constant voltage between 2,41 and 2,58 when fed 5 volts from the arduino itself and when pushing it goes to either 0 or 5 volts.
These go into the analog input on the arduino A0, A1 and A2, so know i need to code it to output a signal.
I tried using the code for the fading led, but cant figure it out, so im basically at the start again. I want to get 2 signals from the A0 input, nothing when its in between 2,40 volts and 2,60 volts and when it goes over that, say 2,65, i want it to send a signal (voltage) to digital 0 which i can use for the valves with a relay inbetween so ican get it up to 12 volt for the valves. When under the voltage, like 2,30 i want it to send a signal to digital 1.
Im not sure if this is the right way to use the arduino for this, but i found codes which did basically the same but only outputting 1 signal not 2.
Any advice how to code this.
Thanks