I’m not going to write your code for you - you won’t learn that way.
As @Gunner suggested, looking at the Sketch Builder examples is a good starting point. This document is also a very good explanation of how to call a function, like the one you want to send RSSI values, using a timer:
Also, you obviously don’t understand the structure of a C++ sketch. I’ll explain a little, but there are better resources out there, especially on YouTube.
This is a function. It happens to be a special function that is run once when the device boots-up, but the principal is the same for other functions.
void setup()
{
Blynk.begin(auth, ssid, pass);
}
It has an opening (left facing) curly bracket at the beginning and a closing (right facing) curly bracket at the end.
void loop is also a special function and it gets run continuously when the code is running. With Blynk, it needs to look like this:
void loop()
{
Blynk.run();
}
or if you’re using a timer (you have to declare it first, see the document I’ve linked above for info) it will look like this:
void loop()
{
Blynk.run();
timer.run();
}
Anything outside of the opening and closing curly brackets of a function is treated as a “declaration”. This is where you specify which libraries are needed, and where you declare your global variables. You can scatter these declarations all over the place if you wish, but best practice is to put them at the top of your code, as you have here:
#define BLYNK_PRINT Serial
#include "ESP8266WiFi.h"
#include "BlynkSimpleEsp8266.h"
#include <Blynk.h>
char auth[] = "07de06a084224282bxxxxxxxxxxxxx";
char ssid[] = "Zappia's WIFI (2.4GHz)";
char pass[] = "xxxxxxxxx";
Now that you understand this, if you work through both of your sets of code, you’ll see that you have unmatched opening and closing brackets, and pieces of code that aren’t contained within a function at all.
When the Arduino IDE attempts to compile this code it gets very confused and throws up errors that aren’t really very meaningful.
Have a read through this post several times, take a look at the sketch builder examples (the Push Data example is fairly similar in structure to what you need) and take a look at your code again.
If you’re still having issues that you cant resolve then post your updated code and details of the problem and we’ll take a look at it.
Pete.