131:1 DC Motor with 64CPR Encoder Precision project

Hello. Im working on a project with a 131:1 DC Motor with 64CPR Encoder , I want to read the inputs from the encoder A and B and to position the motor to a specific position,memorate that position then be able to go to that position, also Im using Visual Basic for commands writing on serial port. This is the motor : http://www.pololu.com/product/1447 This is the driver : http://www.pololu.com/product/1451 I`m using an Arduino Leonardo and a PC power supply to power the driver. Thank you.

This is a very good article (tested, it works):

http://makeatronics.blogspot.mx/2013/02/efficiently-reading-quadrature-with.html

By the way, how are you using arduino and visual basic?

Keep in mind that a 2 channel quadrature encoder's absolute position will be lost on powering down the system. So for absolute position control your program needs to start at some external sensed 'starting position'. This will require an additional sensor that detects a single position in the motors rotation range. That probably doesn't make sense well enough, but think about it before committing to a overall design. A quadrature encoder can only tell you that a step happen or not and in which direction but it has no knowledge of absolute position, as it's your program that keeps track of absolute degrees position by incrementing or decrementing the absolute position variable your program will be using.

Hello. Thank you for reply... Im using arduino and VB by serial communication ( sending and receiving data ) , I can send data but I cant receive data in textbox ( from encoder) and also I want to receive data from a FSR - https://learn.adafruit.com/force-sensitive-resistor-fsr/using-an-fsr . I read about this type of encoder and I will use an END-STOP Switch https://www.lulzbot.com/products/mechanical-endstop-switch , to know where is the Pos = 0, but I don`t know how to implement the code for positioning and also for reading. Thank you !

Ric90: Hello. Thank you for reply... Im using arduino and VB by serial communication ( sending and receiving data ) , I can send data but I cant receive data in textbox ( from encoder) and also I want to receive data from a FSR - https://learn.adafruit.com/force-sensitive-resistor-fsr/using-an-fsr . I read about this type of encoder and I will use an END-STOP Switch https://www.lulzbot.com/products/mechanical-endstop-switch , to know where is the Pos = 0, but I don`t know how to implement the code for positioning and also for reading. Thank you !

So, what exactly do you want to know?, could you implement the code from the article?