Bug in Chapter 3 code

Hello,

I have just found a bug in one of the Chapter 3 files.

It is in the Motor_test_encoder.ino file and here it is:

//Chose the encoder to use:encoder1(default) or encoder2
Serial.print("Encoder1 Pos [counts]: ");
Serial.println(encoder2.getRawCount()); <--- BUG. Should be encoder1.getRawCount()
Serial.print("Encoder1 vel [counts/sec]: ");
Serial.println(encoder2.getCountPerSecond()); <--- BUG. Should be encoder1.getCountPerSecond()

As you can see, we believe we are going to publish what the value of Encoder # 1 is but we accidentally grab the value from Encoder # 2. In this chapter we have no motor on encoder # 2 so the user will not see data and wonder what is broken. Please help correct this in the master code file we give to the community.

Thanks!

Hello,

Thank you for identifying mistakes in the code and the issue has been fixed now.

Best Regards,

Sravya