Blynk Esp8266 não recebe dados

Olá estou tendado enviar dados de um sensor para Esp8266. Pois o Blynk não está recebendo os dados sendo que na porta serial está sendo enviados.

Obrigado

I can 100% guarantee that the issue is with either your device or your code.
However, it’s impossible to be more specific based on the information you’ve provided.
You aren’t new to the forum, so you should know by now that if you want assistance then you have to help us to help you.

Pete.

1 Like

Olá Pedro Obrigado pelo feed.
Vou postar meu código sendo que eu também utilizo em outro dispositivo ethernet Shields w500 e consigo obter todos os valores. Este aqui é meu código que estou tendo dificuldades para ler os valores sendo que na serial os valores são Impresso.

Att Eduardo.

[Unformatted code removed my moderator]

Peter eu tenho outra conta a anos que eu utilizo Arduino Uno + Ethernet w500 sempre funcionou 100%. porem ou criei outro dispositivo com outro e mail e não estava lendo UPTIME até o exemplo Quickstart Device quando Add esp8266. Ai eu Add Outro dispositivo na minha conta antiga e funcionou começou a contar UPTIMER. Na Minha conta nova os ícones são melhores que o da outra conta por isso queria migra meu projeto. O porque disso.

Obrigado

Your code has been removed because it disnt have triple backticks at the beginning and end.
As a long time member of this forum, who has been asked to format your code correctly in the past, you shouldn’t need to be told this.
Please re-post your correctly formatted code.

Pete.

Segue o código.

‘’’
#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// ----- CONFIGURAÇÕES DO BLYNK -----
char auth = “SEU_TOKEN_BLYNK”;
char ssid = “SEU_SSID”;
char pass = “SUA_SENHA_WIFI”;

// Pino analógico do ESP8266
const int sensorPin = A0; // Pino A0 para leitura do ACS712

// Parâmetros do sensor ACS712 30A
float offsetVoltage = 2.5; // Tensão de referência (2.5V é a tensão quando não há corrente)
float sensitivity = 0.066; // Sensibilidade do ACS712 (66mV por Ampere)

// Variáveis para armazenar os valores lidos
int leituraADC = 0;
float tensao = 0.0;
float corrente = 0.0;

void setup() {
// Inicializa o monitor serial
Serial.begin(115200);

// Conecta-se à rede Wi-Fi
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(“.”);
}
Serial.println(“Conectado ao Wi-Fi!”);

// Inicializa a conexão com o Blynk
Blynk.begin(auth, ssid, pass);
}

void loop() {
// Lê o valor do sensor (A0)
leituraADC = analogRead(sensorPin);

// Converte a leitura para a tensão (escala de 0-3.3V para ESP8266)
tensao = leituraADC * (3.3 / 1023.0);

// Calcula a corrente com base na tensão medida
corrente = (tensao - offsetVoltage) / sensitivity;

// Exibe os valores no Serial Monitor para verificação
Serial.print(“Leitura ADC: “);
Serial.print(leituraADC);
Serial.print(” | Tensão no pino A0: “);
Serial.print(tensao, 3);
Serial.print(” V | Corrente: “);
Serial.print(corrente, 3);
Serial.println(” A”);

// Envia o valor da corrente para o Blynk (pino virtual V1)
Blynk.virtualWrite(V1, corrente);

delay(1000);
}
‘’’

@EduardoSantino youve used the wrong characters.
Please see this post for details of tge correct backtick characters….

Copy and paste those characters from that post if you can’t find the correct symbol on your keyboard.

Pete.

Olá segue o código.

#include <ESP8266WiFi.h>   
#include <BlynkSimpleEsp8266.h> 
#include <ACS712.h>

// Configurações do Blynk
char auth[] = "YOUR_BLYNK_AUTH_TOKEN";
char ssid[] = "YOUR_WIFI_SSID";
char pass[] = "YOUR_WIFI_PASSWORD";

// Pinos de leitura
int analogPin = A0;  // Pino do ESP para ler o sensor ACS712
float voltageSensorPin = A1;  // Pino para ler a tensão (se você tiver um sensor de tensão)

ACS712 acs(analogPin);  // Inicializando o sensor ACS712

void setup() {
  Serial.begin(115200);
  Blynk.begin(auth, ssid, pass);  
  acs.begin();  // Inicializa o sensor ACS712
}

void loop() {
  Blynk.run();

  // Leitura da corrente (em A)
  float corrente = acs.getCurrentAC();  // Ou acs.getCurrentDC() para corrente contínua
  Serial.print("Corrente: ");
  Serial.println(corrente);

  // Leitura da tensão (ajustar a fórmula conforme o divisor ou sensor utilizado)
  float voltagem = analogRead(voltageSensorPin) * (5.0 / 1023.0);  // Exemplo para 5V, ajuste conforme o seu sensor/divisor
  Serial.print("Voltagem: ");
  Serial.println(voltagem);

  // Envio dos valores para o Blynk
  Blynk.virtualWrite(V1, corrente);  // Corrente
  Blynk.virtualWrite(V2, voltagem);  // Voltagem

  delay(1000);  // Atualiza a cada 1 segundo
}

Okay, your code is very badly structured, with a cluttered void loop, but I assume that your problem is that you are sending two readings to Blynk every second…

You’ve said that you created a new Blynk account using a different email address. New free accounts have a limit of 30,000 messages per month.
Your sketch send two messages (2 x Blynk.virtualWrite) every second. This is 120 messages per minute, or 7,200 messages per hour. This means that you will have used-up your monthly Blynk message quota in slightly over 4 hours.
I guess that this is why you aren’t seeing any data updates in your dashboard.

If you go to your account section in the web dashboard you will see how many messages have been sent, and how many days it is before any more can be accepted.

Of course, this assuming that your device is actually getting online successfully. You don’t say whether it is, and you have this code in your sketch, which is totally redundant and could be affecting your connectivity…

Pete.

Peter. Não sei se estou sendo objetivo nas minhas explicação . Nesta restota acima você diz que se eu tenho um numero X de Mensagem a ser enviada para APP! Se eu quiser monitorar um sensor de Voltagem como exemplo. Eu não consigo devido ao limite de envios. Sendo assim preciso assim algum plano.

Without you sharing information about what you see in the Account screen of the web console, I can’t really comment much further.
If that screen shows that your 30,000 limit has been reached then you have to do the maths to work-out how frequently you can send the readings to Blynk to stay within the limits.
If the result of that calculation is that the new free account is 7nsuitable for you needs then you’ll either need to pay for a Pro account (US$ 99 per month) or find an alternative solution.

Pete.