Project 5/10/2020
5/10- Motor Encoders
Challenge: motor encoders
Hook up a single motor to 7.4V supply (stop simulation and rewire the motor to change direction - slide switches will not work in Tinkercad even though it should in real life). Get a hardware interrupt to count rising edges on channel A. Use the PINx register to account for direction (quadrature). Add a second motor. This time, hook up channel A to a PCINT. Determine whether PCINT happened on rising edge or falling edge. Use the PINx register to account for direction on the second motor
PUBLIC LINK: https://www.tinkercad.com/things/64winEFeyJf
SESSION OVERVIEW: In this session we learnt about the PINx Register and how to use motor encoders
Motor Encoder
Motor encoders are a function in which it controls the motor
It controls the motor to function precise movements
PINx Register
The register hold the value of a pin when it is set to an input
The register will put a 1 if the voltage is higher than around 2.5 volts
The register will put a 0 is the voltage is lower than 2.5 volts