Algorithm to route a robot based into a Compass

Em Andamento Postado Nov 22, 2015 Pago na entrega
Em Andamento Pago na entrega

I need help into a algorithm to turn a robot left (CCW and stop if compass<= target) or right (CW and stop if compass>= target). The problem is on the zero cross (when the countin pass from 359 to 0 or the opposite), example, I need to turn a robot left 30CCW, and I am into 10. So I need to turn left untill compass<= target, so 340, but see: the position I'm already is compass<= target. THIS IS THE GOAL, fix this.

Below is the resume of the function:

void routingPathC(int targetC, int compass)

{

if (routePathCompassStart == false)

{

routePathCompassStart = false;

routingPathCompass = true;

cw = false;

ccw = false;

degreesC = 0;

// HERE I CALCULATE THE CW AND CCW and set or not ccw, cw and put the value on degrees.

}

if (routingPathCompass == true)

{

// HERE I PUT THE MOVEMENT FUNCTION

}

}

- PLEASE DO NOT PLACE A BID BIGGER THAN MY BUDGET, I'M NOT HIRE YOU, SO DO NOT MESS.

- I NEED IT IN 1h

Algoritmo Programação C Engenharia Elétrica Engenharia Microcontrolador

ID do Projeto: #8950445

Sobre o projeto

1 proposta Projeto remoto Ativo em Nov 22, 2015

Concedido a:

lashabuxo

can do it,especially c++ programming,I have also knowledge about microcontrollers,I have my own robot,so it will be easy to help you

$25 USD em 1 dia
(1 Comentário)
1.2