Question: write an Arduino program. In the beginning of the program before void setup() initialize all your variables. (I will not be telling you to do
write an Arduino program.
In the beginning of the program before void setup() initialize all your variables. (I will not be telling you to do this anymore you should know this is your first step)
Then set your baud rate to 9600 and your digital pin 10 to output (Analog pins are always input and cant be set.)
Output a 70%+ PWM signal on pin10 using the analogWrite() function
Read A0 and A1s values transmit their reading over serial with this line A0 is reading X and A1 is reading Y where X and Y are the values.
Add in if/else if statements that compare X to Y and adds to the message and A0 is equal to/greater/less than A1
*For extra credit ignore steps 3-5
*Read A1s value and convert it into a voltage
*Output a PWM signal on pin10 which is proportionally equal to A1 I.g. if A1 is 2 volts pin10 should have a 40%+duty cycle
*Read A0 and compare it to A1
*Communicate over serial according to the following factors
When A1 and A0 are within .05 volts output The system matches up
When A1 is greater than A0 by .05 output A1 is running high
When A0 is greater than A1 by .05 output A1 is running low
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
