Help with Arduino code
#13
(04-05-2015, 09:57 AM)EdK Wrote: That information helps Chuck.

Looking at the code:




The rotation function gets passed a negative number via ToMove.

The rotation function:




has a "for" loop who's counter is compared to that negative number. I don't think the counter will ever be less than that negative number so the loop won't ever run. I think Arvid needs to verify that since it makes my brain hurt.   Blush

Ed

Never mind what I posted above. I see the error of my ways. This code snippet does indeed give you a positive number which is passed to the rotation function.

Code:
if(Degrees < 0)
   {
     ToMove = (Degrees*Multiplier)*-1;

I'll keep digging when I have a chance.

Ed
Reply
Thanks given by:


Messages In This Thread
Help with Arduino code - by chucketn - 04-04-2015, 02:33 PM
RE: Help with Arduino code - by Vinny - 04-04-2015, 02:52 PM
RE: Help with Arduino code - by EdK - 04-04-2015, 05:21 PM
RE: Help with Arduino code - by chucketn - 04-04-2015, 06:19 PM
RE: Help with Arduino code - by EdK - 04-04-2015, 06:49 PM
RE: Help with Arduino code - by Vinny - 04-04-2015, 07:05 PM
RE: Help with Arduino code - by chucketn - 04-05-2015, 06:34 AM
RE: Help with Arduino code - by arvidj - 04-05-2015, 08:43 AM
RE: Help with Arduino code - by chucketn - 04-05-2015, 09:40 AM
RE: Help with Arduino code - by EdK - 04-05-2015, 09:57 AM
RE: Help with Arduino code - by EdK - 04-05-2015, 10:38 AM
RE: Help with Arduino code - by chucketn - 04-05-2015, 10:09 AM
RE: Help with Arduino code - by EdK - 04-05-2015, 10:19 AM
RE: Help with Arduino code - by chucketn - 04-05-2015, 12:20 PM
RE: Help with Arduino code - by EdK - 04-05-2015, 02:50 PM
RE: Help with Arduino code - by Vinny - 04-05-2015, 04:25 PM
RE: Help with Arduino code - by chucketn - 04-05-2015, 06:22 PM
RE: Help with Arduino code - by EdK - 04-05-2015, 06:49 PM
RE: Help with Arduino code - by Vinny - 04-05-2015, 06:50 PM
RE: Help with Arduino code - by EdK - 04-06-2015, 08:29 AM
RE: Help with Arduino code - by chucketn - 04-06-2015, 11:25 AM
RE: Help with Arduino code - by EdK - 04-06-2015, 11:48 AM
RE: Help with Arduino code - by Vinny - 04-06-2015, 03:47 PM
RE: Help with Arduino code - by EdK - 04-06-2015, 05:26 PM
RE: Help with Arduino code - by EdK - 04-06-2015, 05:34 PM
RE: Help with Arduino code - by Vinny - 04-06-2015, 05:41 PM
RE: Help with Arduino code - by EdK - 04-06-2015, 05:44 PM
RE: Help with Arduino code - by chucketn - 04-06-2015, 05:58 PM
RE: Help with Arduino code - by chucketn - 04-06-2015, 06:00 PM
RE: Help with Arduino code - by chucketn - 04-06-2015, 06:07 PM
RE: Help with Arduino code - by Vinny - 04-06-2015, 07:48 PM
RE: Help with Arduino code - by EdK - 04-07-2015, 05:41 AM
RE: Help with Arduino code - by chucketn - 04-07-2015, 08:02 AM
RE: Help with Arduino code - by chucketn - 04-07-2015, 08:06 AM



Users browsing this thread: 5 Guest(s)