RCModels Channel

RCModels Channel

RP6

RP6


 

Daten:

Hersteller:             Modell:               Fahrwerk:

Arexx                      RP 6                    Heng Long M41

 


altes orginal RP6 Chassis

 


RP 6 Programm im Entwicklungsstatus:

 

/*MyOwnProg*/

#include "RP6RobotBaseLib.h"

/********************************************************/

void bumpersStateChanged(void)
{
if(bumper_left && bumper_right)
{ writeString_P ("!!! Both Bumpers was hit !!!\n");
move(60, BWD, DIST_MM(100), true);
rotate(60, LEFT, 90, true);

}
else if(bumper_left)
{ writeString_P ("!!! Left Bumper was hit !!!\n");
move(60, BWD, DIST_MM(100), true);
rotate(60, RIGHT, 45, true);

}
else if(bumper_right)
{ writeString_P ("!!! Right Bumper was hit !!!\n");
move(60, BWD, DIST_MM(100), true);
rotate(60, LEFT, 45, true);

}
}

/********************************************************/

int main(void)

{
initRobotBase();



{
mSleep (1000);
writeString_P ("conect to RP6...\n");
writeString_P ("\n");
mSleep (2000);
writeString_P ("LED TEST...\n");
writeString_P ("\n");
mSleep (1000);


setLEDs (0b001001);
mSleep (1000);
setLEDs (0b011011);
mSleep (1000);
setLEDs (0b111111);
mSleep (1000);
setLEDs (0b110110);
mSleep (1000);
setLEDs (0b100100);
mSleep (1000);
setLEDs (0b000000);
mSleep (1500);

}
uint16_t ubat = readADC (ADC_BAT);


if (ubat > 650)
{ writeString_P ("BATTERY TEST...OK ");
writeInteger (ubat, DEC);
writeString_P ("0mV");
writeChar ('\n');

uint8_t i;
for (i = 0; i < 2; i++)

{ setLEDs (0b001001);
mSleep (500);
setLEDs (0b00000);
mSleep (500);
setLEDs (0b001001);
mSleep (500);
setLEDs (0b000000);
mSleep (500);
setLEDs (0b001001);
}

}
else
{
writeString_P ("BATTERY LOW...");
writeInteger (ubat, DEC);
writeString_P ("0mV");
writeChar ('\n');

uint8_t u;
for (u = 0; u < 10; u++)

{ setLEDs (0b100100);
mSleep (500);
setLEDs (0b010010);
mSleep (500);
setLEDs (0b100100);
mSleep (500);
setLEDs (0b010010);
}


} writeString_P ("\n");
setLEDs (0b000000);

{
BUMPERS_setStateChangedHandler(bumpersStateChanged);

powerON();

writeString_P ("RP6 ready...");
writeChar ('\n');
writeChar ('\n');



while(true)


task_RP6System();

return 0;
}
}


 

zur Zeit wird mein RP6 auf ein Heng Long M41 Walker Chassis umgebaut.

der Umbau der Hauptplatine ist fast abgeschlossen, Sensoren werden nach außen verlegt, Powerschalter ist oben angebracht als Taster mit

integrierter LED







 

Nach oben