Author
Topic: mapping with visual c++ (Read 3198 times)

somebody help me please!!! i have a problem with my assignment..how to show data from robot to be a map in PC by visual C++??I use a rotary encoder in my robot which the data is sent to PC and then PC will show it to be a tracer mapmay you know the source code...please tell me...thanks for your help.. [email protected]

my problem is how to proccess the data that i get from my rotary encoder become a XY map..when i check my encoder's output, it give data like mechanical encoder in http://www.vishay.com/docs/57089/110e.pdfor may you have mouse optical encoder datasheet so i know the data output from it exactly..thanx

Ok so the encoder sends out pulses, right? And your microcontroller can detect these pulses already, right? Well after each pulse, your robot has traveled Z distance.

So if your robot travels in the X direction, add Z to the X counter. If your robot travels in the Y direction, add Z to the Y counter. As long as your robot only does 90 degree turns, this will always work. If you are confident in math, you can do trig to go at any angle. If you dont know what you are doing, just stick with 90 degree turns for right now, and dont use the quadrature feature.

there are 36 step in 360o and equal with 6.28 cmi want to count that data output and then send it wireless to PC. the transceiver can send 8-bit data in every packet. How to make a right counter?and then How to make it into XY Map ?thanks for your clue..