This code is Arduino UNO with BLE on Samsung S9 with Blynk library 0.6.1
Is it possible to take the readouts of two different Virtual pins and have them combine to create a new variable? Usually I will get an error code (shown after the code)
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
SoftwareSerial SerialBLE(10, 11); // RX, TX
void setup()
{
Serial.begin(9600);
SerialBLE.begin(9600);//goes through provided I connect to Blynk first
Blynk.begin(SerialBLE, auth);
}
void loop()
{
Blynk.run();
trasnmit(num1, num2);
}
void transmit(int x, int y)
{
int m;
m = x * y;
Serial.println(m);
}
BLYNK_WRITE(V0)
{
int num1 = param.asInt();
}
BLYNK_WRITE(V10)
{
int num2 = param.asInt();
}
and below is the error code
exit status 1
'num1' was not declared in this scope