Liste der Anhänge anzeigen (Anzahl: 1)
Hi,
zu deim problem kann ich dir heut nachmittag nochmal helfen, muss jetz weg, nacher guck ichs mir nochmal an *sry 4 now*
aber meine kurze frage:
Code:
#include "RP6RobotBaseLib.h"
int main(void)
{
initRobotBase();
DDRA |= 1;
DDRA |= 2;
int x = 15; // 10<=x<=20; wenn x >15 in die eine richtung, x<15 in die andre, x=15 stillstand
int i = 0;
while(true)
{
if(i<100)
{
x=15;
PORTA |= 1;
sleep(x);
PORTA &= ~1;
PORTA |= 2;
sleep(30-x);
PORTA &= ~2;
sleep(170);
}
if((i>100)&&(i<200))
{
x=20;
PORTA |= 1;
sleep(x);
PORTA &= ~1;
PORTA |= 2;
sleep(30-x);
PORTA &= ~2;
sleep(170);
}
if(i>200)
{
x=10;
PORTA |= 1;
sleep(x);
PORTA &= ~1;
PORTA |= 2;
sleep(30-x);
PORTA &= ~2;
sleep(170);
}
i++;
}
return(0);
}
das hab ich compiliert und reingeladen, die servos haben keinen muks gemacht...
radbruch könntest du mein hexfile vlt. schnell testen?
LG Pr0gm4n