Hello Blynkers⌠Iâm working with Arduino Uno and Ethernet Shield for my IoT projects. i got âflood errorâ message when using a scetch⌠in âdocsâ said to use BlynkConfig.h ⌠but where can i find the BlynkConfig.h
Thanks
Cloud or local server?
Cloud or Local? i donât know what you meanâŚ
i think Blynk is CloudâŚ
why donât you work out why you have âflood errorâ and fix that instead???
i use simple timerwith 100ms interval⌠i think thatâs the problemâŚ
Soundâs like you are using the Cloud so as @Dave1829 points out you need to fix your sketch not the libraries.
what must i do with the scetch ?
Post here if you donât know how to debug it, but before you post it ensure it is formatted.
/*************************************************************
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Blynk community: http://community.blynk.cc
Social networks: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
You can use this sketch as a debug tool that prints all incoming values
sent by a widget connected to a Virtual Pin 1 in the Blynk App.
App project setup:
Slider widget (0...100) on V1
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <SimpleTimer.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "58d599d309e349b49e70349f5ab23e85";
SimpleTimer timer;
const int in1 = 2;
const int in2 = 3;
const int ls = 6;
const int re7 = 7;
const int led1 = 22;
const int led2 = 24;
const int led3 = 26;
const int led4 = 28;
const int led5 = 30;
const int led6 = 32;
const int led7 = 34;
const int led8 = 36;
const int led9 = 38;
const int led10 = 40;
const int led1in = 23;
const int led2in = 25;
const int led3in = 27;
const int led4in = 29;
const int led5in = 31;
const int led6in = 33;
const int led7in = 35;
const int led8in = 37;
const int led9in = 39;
const int led10in = 41;
int v1update = 0;
int lastv1update = 0;
int lsState = 0;
int lastlsState = 0;
int led1State = 0;
int led2State = 0;
int led3State = 0;
int led4State = 0;
int led5State = 0;
int led6State = 0;
int led7State = 0;
int led8State = 0;
int led9State = 0;
int led10State = 0;
int counter = 0;
void setup()
{
// Debug console
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(ls, INPUT);
pinMode(re7, OUTPUT);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
pinMode(led6, OUTPUT);
pinMode(led7, OUTPUT);
pinMode(led8, OUTPUT);
pinMode(led9, OUTPUT);
pinMode(led10, OUTPUT);
pinMode(led1in, INPUT);
pinMode(led2in, INPUT);
pinMode(led3in, INPUT);
pinMode(led4in, INPUT);
pinMode(led5in, INPUT);
pinMode(led6in, INPUT);
pinMode(led7in, INPUT);
pinMode(led8in, INPUT);
pinMode(led9in, INPUT);
pinMode(led10in, INPUT);
digitalWrite(re7, HIGH);
Serial.begin(9600);
Blynk.begin(auth);
timer.setInterval(100L, sendls);
timer.setInterval(100L, button);
}
void loop()
{
Blynk.run();
timer.run();
}
BLYNK_WRITE(V1)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
if (pinValue == 1) {
v1update = 1;
}
if (pinValue == 0) {
v1update = 0;
}
if (v1update != lastv1update) {
counter = 0;
if (v1update == 1) {
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
}
if (v1update == 0) {
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
}
}
lastv1update = v1update;
}
BLYNK_WRITE(V3)
{
int pinValue3 = param.asInt();
if (pinValue3 == HIGH) {
digitalWrite (led1, HIGH);
}else{
digitalWrite (led1, LOW);
}
}
BLYNK_WRITE(V4)
{
int pinValue4 = param.asInt();
if (pinValue4 == HIGH) {
digitalWrite (led2, HIGH);
}else{
digitalWrite (led2, LOW);
}
}
BLYNK_WRITE(V5)
{
int pinValue5 = param.asInt();
if (pinValue5 == HIGH) {
digitalWrite (led3, HIGH);
}else{
digitalWrite (led3, LOW);
}
}
BLYNK_WRITE(V6)
{
int pinValue6 = param.asInt();
if (pinValue6 == HIGH) {
digitalWrite (led4, HIGH);
}else{
digitalWrite (led4, LOW);
}
}
BLYNK_WRITE(V7)
{
int pinValue7 = param.asInt();
if (pinValue7 == HIGH) {
digitalWrite (led5, HIGH);
}else{
digitalWrite (led5, LOW);
}
}
BLYNK_WRITE(V8)
{
int pinValue8 = param.asInt();
if (pinValue8 == HIGH) {
digitalWrite (led6, HIGH);
}else{
digitalWrite (led6, LOW);
}
}
BLYNK_WRITE(V9)
{
int pinValue9 = param.asInt();
if (pinValue9 == HIGH) {
digitalWrite (led7, HIGH);
}else{
digitalWrite (led7, LOW);
}
}
BLYNK_WRITE(V10)
{
int pinValue10 = param.asInt();
if (pinValue10 == HIGH) {
digitalWrite (led8, HIGH);
}else{
digitalWrite (led8, LOW);
}
}
BLYNK_WRITE(V11)
{
int pinValue11 = param.asInt();
if (pinValue11 == HIGH) {
digitalWrite (led9, HIGH);
}else{
digitalWrite (led9, LOW);
}
}
BLYNK_WRITE(V12)
{
int pinValue12 = param.asInt();
if (pinValue12 == HIGH) {
digitalWrite (led10, HIGH);
}else{
digitalWrite (led10, LOW);
}
}
BLYNK_WRITE(V14)
{
int pinValue6 = param.asInt();
if (pinValue6 == HIGH) {
Blynk.virtualWrite(V3, LOW);
Blynk.virtualWrite(V4, LOW);
Blynk.virtualWrite(V5, LOW);
Blynk.virtualWrite(V6, LOW);
Blynk.virtualWrite(V7, LOW);
Blynk.virtualWrite(V8, LOW);
Blynk.virtualWrite(V9, LOW);
Blynk.virtualWrite(V10, LOW);
Blynk.virtualWrite(V11, LOW);
Blynk.virtualWrite(V12, LOW);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW);
digitalWrite(led4, LOW);
digitalWrite(led5, LOW);
digitalWrite(led6, LOW);
digitalWrite(led7, LOW);
digitalWrite(led8, LOW);
digitalWrite(led9, LOW);
digitalWrite(led10, LOW);
}
}
void sendls ()
{
lsState = digitalRead(ls);
if (lsState != lastlsState) {
if (lsState == HIGH) {
counter++;
}
}if (counter >= 1) {
digitalWrite(re7, LOW);
}else{
digitalWrite(re7, HIGH);
}lastlsState = lsState;
}
void button()
{
led1State = digitalRead(led1in);
led2State = digitalRead(led2in);
led3State = digitalRead(led3in);
led4State = digitalRead(led4in);
led5State = digitalRead(led5in);
led6State = digitalRead(led6in);
led7State = digitalRead(led7in);
led8State = digitalRead(led8in);
led9State = digitalRead(led9in);
led10State = digitalRead(led10in);
Blynk.virtualWrite(V3, led1State);
Blynk.virtualWrite(V4, led2State);
Blynk.virtualWrite(V5, led3State);
Blynk.virtualWrite(V6, led4State);
Blynk.virtualWrite(V7, led5State);
Blynk.virtualWrite(V8, led6State);
Blynk.virtualWrite(V9, led7State);
Blynk.virtualWrite(V10, led8State);
Blynk.virtualWrite(V11, led9State);
Blynk.virtualWrite(V12, led10State);
}
heloo
@gabryel_rosely are the virtualWrite() commands to Value Display widgets?
As you are using SimpleTimer can you ensure you set the frequency of all the widgets to PUSH.
After you have done that provide Serial Monitor data if you are still flooding the server.
btw⌠now itâs not flooding
i use the State Change detection example and apply it on my scetch so i only send data to blynk if the state changeâŚ
Thanks all