You can use any 6V Solar Panel with the Boron. Here's a couple that I've tested:
PIR:
Try this out:
// Jumper in H position
int PIR = D4;
int motion = 0;
int pirState = LOW;
int donePIN =D3;
void setup() {
Serial.begin(9600);
pinMode(PIR, INPUT); // PIR: No Motion = High, Motion = LOW,
pinMode(D7, OUTPUT);
}
void loop() {
motion = digitalRead(PIR);
if (motion == HIGH) { // PIR OutPut is HIGH = MOTION
digitalWrite(D7, HIGH);
if (pirState == LOW) {
// we have just turned on
Serial.println("Motion detected!");
// We only want to print on the output change, not state
pirState = HIGH;
}
} else {
digitalWrite(D7, LOW); // turn LED OFF
if (pirState == HIGH){
// we have just turned off
Serial.println("Motion ended!");
// We only want to print on the output change, not state
pirState = LOW;
}
}
}