Question: I'm trying to using C to control the Arduino board to control the speed of the 2 motors. However, when uploading the code, each motor

I'm trying to using C to control the Arduino board to control the speed of the 2 motors. However, when uploading the code, each motor runs at different speed despite having the same OCR value.

Can you guys double check thanks a lot what might be wrong

 I'm trying to using C to control the Arduino board to

sensor-motor_test | Arduino 1.8.2 File Edit Sketch Tools Help 90 sensor-motor-test #include #include void setup) [ 5583300 iasicn DDRD = B00000000; TCCRCA = TCCRIA B10100011; //you can just copy and paste the next 3 lines and just have TCCR2B = B00000001; TCCRIB B00000100; //or read this one: https://Www.sparkfun.com/datasheets/Components/SMD ATMega328.pdf (page 106) OCR2A = 0 ; //to change to the correspond PIN that you guys set on the //board CRIB = 0; void loop ) OCRIB-255; OCR2A 255: PORTBBV (PORTB4); PORTBBV (PORTB5)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!