D-Link DSL-G684T Bedienungsanleitung Seite 34

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 118
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 33
34
At the beginning to control servomechanism it needs to be defined. To do this
             
command.
SPI (Serial Peripheral Interface) is used to provide communication between
Arduino Uno board and WiFly shield. After defining SC16IS750 register definitions we
need to initialize Arduino pins over which communication will take place.
Next are the pins that are used when reset button and supervising LED are used.
pinMode(ledPin, OUTPUT);
digitalWrite(inPin, HIGH);
pinMode(MOSI, OUTPUT);
pinMode(MISO, INPUT);
pinMode(SCK,OUTPUT);
pinMode(CS,OUTPUT);
pinMode(photoPin, INPUT); // setting input pin
digitalWrite(CS,HIGH); //disable device
SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR1)|(1<<SPR0);
clr=SPSR;
clr=SPDR;
delay(10);
Serial.begin(9600);
myservo.attach(9);
myservo1.attach(8);
myservo.write(myservo_pos);
myservo1.write(myservo_pos);
Seitenansicht 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 117 118

Kommentare zu diesen Handbüchern

Keine Kommentare