LED Joystick Control

Use your skills from the Arduino joystick intro to guide you in this program.  Do the intro assignment first before you dive into this one.

Your goal is write a program that controls four LEDs with a joystick.  No Tinkercad here – it’s a real, physical circuit.

Like this*:
UP turns on the red LED
DOWN turns on the green LED
LEFT turns on the white LED
RIGHT turns on the blue LED

When the joystick is centered then all LEDs should be OFF.

*(pick your own colors)

NOTE: you need to use multiple IF statements to work.  Look at the serial monitor and notice how the numbers for X axis and Y axis change based on the position of the joystick.  Think about how you would use greater than (>) and less than to create four if statements in your program.  Why are there four if statements?

If you are building your program from the sample program in Joystick Intro then this line of code will help.  :

What happens here? If the value of X_pin is greater than 600, the red led will turn on.