Question: #include Servo myServo; int joystickX = A 0 ; int joystickY = A 1 ; int rgbRed = 9 ; int rgbGreen = 1 0
#include
Servo myServo;
int joystickX A;
int joystickY A;
int rgbRed ;
int rgbGreen ;
int rgbBlue ;
void setup
myServo.attach;
pinModergbRed OUTPUT;
pinModergbGreen OUTPUT;
pinModergbBlue OUTPUT;
void loop
int xValue analogReadjoystickX;
int yValue analogReadjoystickY;
if yValue
digitalWritergbRed HIGH; Forward Motion Indicator
digitalWritergbGreen LOW;
myServo.write;
else if yValue
digitalWritergbBlue HIGH; Reverse Motion Indicator
digitalWritergbGreen LOW;
myServo.write;
else
digitalWritergbRed LOW;
digitalWritergbBlue LOW;
digitalWritergbGreen HIGH; Neutral Indicator
myServo.write;
Based on the Arduinos code please provide a replication of this using Click PLC programming software PLC Fiddle, as well as a circuit diagram using the website circuit diagram editor circuitdiagram.orgeditor
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
