|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Odd counter problems
Quote:
Code:
printf("Test");
--EDIT-- If it doesn't work then post your code and people can look at it. |
|
#2
|
|||
|
|||
|
Re: Odd counter problems
It printed test but here it is. I'm using a basic auto right now so i can debug everything first.
|
|
#3
|
||||
|
||||
|
Re: Odd counter problems
Quote:
--EDIT-- Try changing the %i in the printf to %d. |
|
#4
|
||||||
|
||||||
|
Re: Odd counter problems
Quote:
Catastrophy, is your problem fixed now that it is counting, or do you have more problems? |
|
#5
|
||||
|
||||
|
Re: Odd counter problems
Quote:
|
|
#6
|
|||
|
|||
|
Re: Odd counter problems
well the motors still arnt stopping.
|
|
#7
|
||||||
|
||||||
|
Re: Odd counter problems
Quote:
If you are using the corrections that Rob posted, pwm06 will go forward for about 1/3 a second and then go in reverse forever. You also have a similar behavior for pwm07 (assuming you corrected the errors) |
|
#8
|
||||||
|
||||||
|
Re: Odd counter problems
A few things I saw after glancing at it:
Code:
if (armcounter = 15) //will raise arm. pwm06=0; else armcounter++; pwm06=255; Code:
if (armcounter == 15) //will raise arm.
pwm06=0;
else {
armcounter++;
pwm06=255;
}
That said, I believe the code in its original form should have printf'd 15 over and over and over. Was it doing that, or just not printing anything? |
|
#9
|
||||
|
||||
|
Re: Odd counter problems
Quote:
![]() |
|
#10
|
|||
|
|||
|
Re: Odd counter problems
Well the = was something i accidently did when moving it i had it in the code i was using. and btw its just not printing anything.
|
|
#11
|
||||
|
||||
|
Re: Odd counter problems
Quote:
|
|
#12
|
||||
|
||||
|
Re: Odd counter problems
Quote:
Code:
if (armcounter == 15) //will raise arm.
pwm06=0;
else {
armcounter++;
}
pwm06=255;
you said that the "motors weren't stopping" - of course they aren't: 0 is full reverse, 255 is full forward. if you want a motor to stop, set the PWM to 127. |
|
#13
|
|||
|
|||
|
Re: Odd counter problems
Well i got it working i was messign with the code when i posted it so i accidently left stuff out. Thanks Tex helped a lot.
|
|
#14
|
|||
|
|||
|
Re: Odd counter problems
Quote:
Code:
printf("Test\n");
|
|
#15
|
||||
|
||||
|
Re: Odd counter problems
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Meeting FIRST People in odd places | Jeff Waegelin | General Forum | 219 | 04-03-2012 13:10 |
| Do you all have problems with.... | Munkaboo | Website Design/Showcase | 19 | 03-03-2003 19:51 |
| Joystick problems | archiver | 2001 | 3 | 24-06-2002 02:40 |
| A couple of problems I observed at the MAR | archiver | 2000 | 3 | 23-06-2002 22:27 |
| Radio problems -- not | archiver | 2000 | 1 | 23-06-2002 22:23 |