@exeng - I finally got mine installed. I forgot that I had ordered the Oak Relay Shield - so I soldered that up and worked out the final bit of code - now I have a simple remote garage door opener. I hope to add some sensors to it later, but for now at least it's opening/closing.
Sidenote: I haven't updated my Blynk app yet, but since I was a Kickstarter backer of their original project I already got my email telling me I'll never run out of energy. I'm interested to see how that will work. I don't blame them - they gotta make money to keep the lights on. I think I'd be happy to pay if I had to (within reason) - such an incredibly useful app already - and I haven't even done any projects yet beyond this door opener.
Sidenote 2: the Oak Relay shield is poorly designed (and I say that as someone who really likes Erik and his projects - I was a backer for Digispark and Digispark Pro). The shield only has one side of the Oak pins - but is just big enough to effectively block the other side of the board from even using jumper wires. I guess I'm glad he focused more on getting the project out the door - but I just wanted to mention it for others. I'm going to see if he's posted the Eagle files for the shield so I can see if I can make it smaller to open up the blocked pins for jumper wires or just widen it a bit and bring the second row of pins up to the shield.
Here's the code I ended up with:
/* http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
* This example runs directly on Oaks.
*
* Please be sure to select Oak
* in the Tools -> Board menu!
*
* Change Blynk auth token to run :)
*
**************************************************************/
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleOak.h>
//#include <SimpleTimer.h>
WidgetLCD lcd(V5); // Blynk LCD widget
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "AUTHTOKENHERE";
int OakLEDpin = 1; // Oak onboard LED pin 1
int Relaypin = 5; // relay on pin 5
BLYNK_WRITE(V1) //Button Widget is writing to pin V1
{
if (param.asInt()==1)
{
lcd.print(0,0, "You Shall Pass! ");
lcd.print(0,1, " ");
digitalWrite(OakLEDpin, HIGH);
digitalWrite(Relaypin, HIGH);
delay(500);
digitalWrite(OakLEDpin, LOW);
digitalWrite(Relaypin, LOW);
lcd.print(0,0, "You Shall Pass! ");
lcd.print(0,1, " DONE! ");
}
else
{
lcd.print(0,0, " Waiting... ");
lcd.print(0,1, " ");
}
}
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
pinMode(OakLEDpin, OUTPUT);
digitalWrite(OakLEDpin, LOW);
pinMode(Relaypin, OUTPUT);
digitalWrite(Relaypin, LOW);
}
void loop() {
Blynk.run();
}
And attached are some pictures (of really nothing more than an Oak and an Oak relay shield).
Thanks again for the help on getting started with Blynk/Oak!