Example #1
0
// functions
void init_claw ()
{
	claw_servo.attach(28);  // attaches the servo on Arduino pin 28 to the SoftwareServo object 
	open_claw();
	claw_closed = 0;
	
}
Example #2
0
File: tank.c Project: daef/MOWTANK
void setup() {
    pinMode( SPDA       , OUTPUT );
    pinMode( SPDB       , OUTPUT );
    pinMode( STANDBY    , OUTPUT );
    pinMode( STATUS_LED , OUTPUT );
    pinMode( DIR1A      , OUTPUT );
    pinMode( DIR2A      , OUTPUT );
    pinMode( DIR1B      , OUTPUT );
    pinMode( DIR2B      , OUTPUT );
                         
    myservo.attach(HAXXXOR);  // attaches the servo pin
    initservo();
    
    fullStop(); //init's all previous outputs
    
    Serial.begin(USBSERIAL);        // init USB Serial (console)
    Serial1.begin(BTGPSRATE);       // init pin0/1 Serial (bluetooth)
    delay(1234); 
    setupBT(3210);
    while(readBT() != CMD_STOP);    // safety frist? ¯\(°_o)/¯ I DUNNO LOL
}