예제 #1
0
void setup()
{
  // start serial port at 9600 bps:
  Serial.begin(9600);
  pinMode(2, INPUT);   // digital sensor is on digital pin 2
  establishContact();  // send a byte to establish contact until receiver responds 
}
예제 #2
0
파일: Turret.cpp 프로젝트: goodn922/rbots
void setup() 
{ 
  
  // initialize the digital pin for the gun as an output:
  pinMode(gunPin, OUTPUT); 
  
  // The two servos to control the turret
  servoAz.attach(9);  // attaches the az servo on pin 9 to the servo object
  servoEl.attach(10);  // attaches the el servo on pin 10 to the servo object
  
  // The BlueSMiRF bluetooth module is currently configured for 115200 kbps
  Serial.begin(115200); 

  // prints a starting string
  Serial.println("Press any key to begin...");
  establishContact(); 
} 
예제 #3
0
/**
 * Setups the port.
 */
void setup() {
  Serial.begin( PORT_SPEED );
  establishContact();
}