Pocket Quad V1.1のAUX1他3ピン(MISO, MOSI, SCK)にLEDを接続。それぞれ点滅させてみた。
以上略・・・
int aux1Pin = 8;
void setup()
{
Serial.begin(9600);
pinMode(aux1Pin, OUTPUT);
DDRB |= 0x0e; // 0x08=MISO(PB3), 0x04=MOSI(PB2), 0x02=SCK(PB1)
initOutput();
initSensors();
}
void loop()
{
PORTB |= 0x08;
delay(50);
PORTB |= 0x04;
delay(50);
PORTB |= 0x02;
delay(50);
digitalWrite(aux1Pin, HIGH);
delay(50);
PORTB &= ~0x08;
delay(50);
PORTB &= ~0x04;
delay(50);
PORTB &= ~0x02;
delay(50);
digitalWrite(aux1Pin, LOW);
delay(50);
以下略・・・
はんだ付けする際に邪魔なのでLEDの高さをずらしたけど、できてみるとそんなことする必要なかった感じ。

