@Dave1829 you have access to 32 virtual pins with one dashboard and 2 devices sharing one token.
I’m not quite sure how you map the 32 virtual pins to the pins of the 2 devices though.
Surely if you have V0 in the dashboard and you can only refer it to say GPIO 2 on an ESP and it would trigger the GPIO 2 on BOTH devices so you are still left with the 7 unique GPIO’s you refer to in your original post.
With bridge and 2 tokens you have access to the 14 pins you require.
@Dave1829 if you are using just one token then each sketch has the variables available. So for the variable you want to pass you just ensure it is defined in both sketches.
I find the read and write’s a little confusing and consider them to be named in the opposite way to human thinking but that might just be me.
So sketch 1 write’s the value on the display with the READ command:
Arduino: 1.6.5 (Windows 8.1), Board: "Generic ESP8266 Module, Serial, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck"
Build options changed, rebuilding all
_160311_basement_plenum_controller.ino: In function 'void BlynkWidgetWrite30(BlynkReq&, const BlynkParam&)':
_160311_basement_plenum_controller:64: error: 'const class BlynkParam' has no member named 'asFloat'
_160311_basement_plenum_controller.ino: In function 'void BlynkWidgetWrite2(BlynkReq&, const BlynkParam&)':
_160311_basement_plenum_controller:69: error: 'const class BlynkParam' has no member named 'asFloat'
'const class BlynkParam' has no member named 'asFloat'
thank you @Costas my new FTDI programer arrived and i have now uploaded and tested these adjustments you suggest - all working now! (seems not to matter if variable changes type between sketches!)
i have one ESP8266 node that sends its sensor outputs the the master ESP8266 that controls my relays!!!
“Master” - where the readings are USED decide when to open/close relays:
double TempNode02, DewPointNode02; //from Node02
BLYNK_WRITE(V26)
{
TempNode02 = param.asDouble(); // gets reading from Node02 which is a separate ESP8266 device - it is the LIVING ROOM DHT22 sensor
}
BLYNK_WRITE(V7)
{
DewPointNode02 = param.asDouble(); // gets reading from Node02 which is a separate ESP8266 device - it is the LIVING ROOM DHT22 sensor
}
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
the “Node” code where the sensor is operated, and ‘sends’ readings to the “Master”:
float TempNode02, DewPointNode02;
BLYNK_READ(V26)
{
Blynk.virtualWrite(26, TempNode02);
}
BLYNK_READ(V7)
{
Blynk.virtualWrite(7, DewPointNode02);
}
void runDHT22()
{
int chk;
chk = DHT.read22(LIVING_DHT22_PIN);
HumNode02 = DHT.humidity;
TempNode02 = DHT.temperature;
DewPointNode02 = dewPoint(DHT.temperature, DHT.humidity);
Blynk.virtualWrite(V26, TempNode02);
Blynk.virtualWrite(V7, DewPointNode02);
}
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
i don’t really know how having the variables as a float in one sketch but double in the other is affecting anything - certainly doesn’t seem to…
I recieved the value from light sensor at A0 Pin in Node MCU. I want to use this value for automatic dimmig lighting by adjusted Duty cycle of PWM at D2 Pin in Node MCU. How to program the code and I want to use them with Blynk.
How to connect Vitual pin to real pin on node MCU.
First, there is no need to involve Blynk in these kinds of operations. Why do you need Virtual Pin, when you can just take the A0 sensor data and map it to D2 output?
Dimitriy how many devices can i use sharing the same aunth token. Im using just two but im having disconnection issues. I dunnonifbis my code or the fact of sending the data to 2 devices. However im not reading the same virtu pins for both of them for instance one reads v10 to v20 the other v110 to v120
Thabks for your help