Download the CAD file by clicking: http://piwifio.com/Brute4ce22.pcb
The CAD file can be viewed AND PC boards can be ordered
by using http://expresspcb.com CAD software.
Minimum order is $68 for (3) PC boards,
Yielding (6) Esp12-e Quad Relay circuits
well- I sure hope all is going swimmingly with the ESP12-e integration,
because I just sent off to expressPCB.com
for (2) Esp12-e designs.
I put 2 separate designs on 1 board. I’m…“frugal”.
These will be my “experimenter” PC boards for the Esp12-e.
I haven’t even fired up an Esp12-e yet. I hope it works…
I’m thinking “GROW LIGHT Controller”. Yeah.
-With (4) binary inputs for thermostats and door alarms.
Relays will be used for lighting and exhaust fans (triggered by thermostats).
It would be awesome if I can monitor everything remotely, on my Nexus7.
I LOVE California!
Be SURE you have the proper permits, though,
or you get arrested!
Meh.
I SHOULD have put a THIRD circuit on there,
instead of (2) “Allie” circuits.
The third circuit uses a MCP3004 4 input SPI bus A/D converter.
I’d eliminate the relay and GPIO connector,
and have a RJ45 connector to the MCP3004.
-for 4 temperature and humidity (or binary switch) inputs.
Oh well, too late. Next time.
I’ll post a “Trio” PC board in the “project” section after testing.
-Gotta test!
It’s all good.
This circuit works like a champ!
I’ve already made a couple of’em.
As of this time- there is no “official” support on ESP units-
so…
I cannot (at this time) directly control
relay 2, 3 and 4 (GPIO 13, 14 and 16).
You CAN do a software work-around using VIRTUAL PINS,
(I wish someone could post the code for this @adam )
OR
you can reroute each transistor “base”
current limiting resistors
to GPIO 2, 4 and 5
without modifying any PC board traces.
Either method works.
//#define CAYENNE_DEBUG // Uncomment to show debug messages
//#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "qrm6a4rr6e";
// Your network name and password.
char ssid[] = "FBI Wiretap";
char password[] = "insanefun";
void setup()
{
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}
void loop()
{
Cayenne.run();
}
The code is very simple. Just add a new widget for your device using virtual pin instead of digital/analog (ex. pin V0) and then use this in your code below the loop function:
CAYENNE_IN(V0){ //Change V0 to whatever your virtual pin number is. Create additional CAYENNE_IN functions for additional virtual pins
Serial.println("Receiving Data");
//code here
}
//#define CAYENNE_DEBUG // Uncomment to show debug messages
//#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "qrm6a4rr6e";
// Your network name and password.
char ssid[] = "FBI Wiretap";
char password[] = "insanefun";
void setup()
{
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}
void loop()
{
CAYENNE_IN(V13){ //Change V0 to whatever your virtual pin number is. Create additional CAYENNE_IN functions for additional virtual pins
Serial.println("Receiving Data");
//code here
Cayenne.run();
}
//#define CAYENNE_DEBUG // Uncomment to show debug messages
//#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "qrm6a4rr6e";
// Your network name and password.
char ssid[] = "FBI Wiretap";
char password[] = "insanefun";
void setup()
{
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}
void loop()
{
Cayenne.run();
}
CAYENNE_IN(V13){ //Change V0 to whatever your virtual pin number is. Create additional CAYENNE_IN functions for additional virtual pins
Serial.println("Receiving Data");
//code here - do whatever you want to do ex digitalWrite
digitalWrite(13,!digitalRead(13));
}
CAYENNE_IN(V14){ //Change V0 to whatever your virtual pin number is. Create additional CAYENNE_IN functions for additional virtual pins
Serial.println("Receiving Data");
//code here - do whatever you want to do ex digitalWrite
digitalWrite(14,!digitalRead(14));
}
CAYENNE_IN(V16){ //Change V0 to whatever your virtual pin number is. Create additional CAYENNE_IN functions for additional virtual pins
Serial.println("Receiving Data");
//code here - do whatever you want to do ex digitalWrite
digitalWrite(16,!digitalRead(16));
}
CAYENNE_IN(V13){ //Change V0 to whatever your virtual pin number is. Create additional CAYENNE_IN functions for additional virtual pins
Serial.println("Receiving Data");
//code here - do whatever you want to do ex digitalWrite
digitalWrite(13,!digitalRead(13));
}
But I don’t understand
"
code here - do whatever you want to do ex digitalWrite
digitalWrite(14,!digitalRead(14));
"
Can you show me an example of MAKING the ESP12-e
GPIO 14 as a digital INPUT ,
and
Making GPIO 16 a digital OUTPUT?
I tried cutting and pasting your code, but still I can’t add “virtual” pins 14, and 16.
After loading the code, I added the device to Cayenne, added virtual GPIO pin 14 as a digital input. It didn’t work.
Instead of CAYENNE_IN(V14) use CAYENNE_OUT(V14) and then send your data in that function. There are plenty of examples around here, one of them is here