DFRobot DFRduino Romeo-All in one Controller V1.1 매뉴얼 - 페이지 12
{카테고리_이름} DFRobot DFRduino Romeo-All in one Controller V1.1에 대한 매뉴얼을 온라인으로 검색하거나 PDF를 다운로드하세요. DFRobot DFRduino Romeo-All in one Controller V1.1 13 페이지.
{
digitalWrite(E1, HIGH);
analogWrite(M1, (m1p));
digitalWrite(E2, HIGH);
analogWrite(M2, (m2p));
}
void setup(void)
{
int i;
for(i=6;i<=9;i++)
pinMode(i, OUTPUT);
Serial.begin(19200);
}
void loop(void)
{
if(Serial.available()){
char val = Serial.read();
if(val!=-1)
{
switch(val)
{
case 'w'://Move Forward
DriveMotorP(0xff,0xff); // Max speed
break;
case 'x'://Move Backward
DriveMotorP(0x00,0x00);
; // Max speed
break;
//Set Baud Rate