I'm writing myself a garage door opener and so far so good... even writing the iPhone app was strangely quick and simple!
Everything is working except for 1 tiny detail: when power is applied to the RFduino it momentarily boots up in "Normally Closed" mode...
This behavior makes the garage door *open* anytime there's a power failure and the power comes back on... doh!
I've got the code in the setup() so that the pinmode is set to Output and the relays are set to "low" (i.e. normally open)... but it seems that by default when the RFduino + Dual Relay shield boots up: the circuit is in the "NC" position and, in my case, opens my garage door.
Just in case you want to see it, here is my "setup" code:
// First and foremost, let's set the relays pins to output..
// Note to self: I set the pin mode on both relays just to be safe... even
// if I will only use the 1st relay.
// By default, the Relays appear to be "On" unless we turn them off right away...
// Setup the RFduino name and power level...
RFduinoBLE.deviceName = "RFduino";
RFduinoBLE.advertisementData = "Garage";
RFduinoBLE.advertisementInterval = MILLISECONDS(300);
// Note to self: power adjusted from -18 to -12 so that the signal would
// be able to punch thru the garage door which seems to be made of
// some sort of metal mined from an astroid that fell from space and blocks
// the bluetooth signal...
RFduinoBLE.txPowerLevel = -12; // (-20dbM to +4 dBm)
// Start the BLE stack
Is this normal and is there a workaround?
Also, I've done a simple test with a breadboard and a LED: when power is applied to the RFduino, the led turns on for a millisecond and then turns off.
Thank you for any ideas you might provide me with,