no, just commute to blynk server , not custom
original setting at blynk server not custom…mybe i need to uninstall and re install back this app…
are you sure to have wifi enable ?
yes…i always use this app…only today can’t huhuhu…i try install at android phone = OK
I just connected to blynk server,
work well for me
after uninstall and reinstall back all ok…thanks friend
hi friends…what function timer.run() ? is’t function like delay?
i try use Virtual Led for my project (other project) i use blynk timer and result is = led blinking not solid.
void sensor()
{
sensora = digitalRead(sen1); // read IR sensor
if (sensora == HIGH){
ledv1.on();
}
sensorb = digitalRead(sen2); // read IR sensor
if (sensorb == HIGH) {
ledv2.on();
}
sensorc = digitalRead(sen3); // read IR sensor
if (sensorc == HIGH){
ledv3.on();
}
sensord = digitalRead(sen4); // read IR sensor
if (sensord == HIGH) {
ledv4.on();
}
else {
ledv1.off();
ledv2.off();
ledv3.off();
ledv4.off();
}
}
.
.
.
.
.
.
void setup()
timer.setInterval(1000L, sensor);
This is what makes the Timer work. Without it, your timers will not execute.
This command creates a timer that executes the function sensor() every 1 second.
You may find this link useful, as the timer has many capabilities.
Simple Timer (Blynk Timer)
so if i need turn ON led when sensor get input what should i do? so blur right now hahaha.
if i use blynk timer LED blink not solid ON
That is what your code does. Every 1 second it checks the state of the digital pins and turns the corresponding LED on or off as the If statement tells it to.
What exactly is it that you are trying to accomplish?
else {
ledv1.off();
ledv2.off();
ledv3.off();
ledv4.off();
ahah, you have grouped else !!!
try this
sensora = digitalRead(sen1); // read IR sensor
if (sensora == HIGH){
ledv1.on();
} else {
ledv1.off();
}
waaa…good idea hahaha…ok i test now
toro_blanco… i try to control my lamp and fan using blynk…it aslo have 2 way control, that mean i can on/off using blynk and also can on/off using wall switch…
so i need virtual Led to show status my lamp or fan…
Alexis_Cabrera it’s work…thanks friend…
you are welcome
hi friend @ Alexis_Cabrera …are u familiar with terminal widget function ?
Just look up the terminal widget example. Well documented. You’ve two choices writing to terminal. Use terminal.print or blynk.virtualWrite to the virtual pin. Recommend the second mode.
i already try terminal widget example and it work with i2c lcd display…now i try use RGBmatrixPanel with arduino mega…without Blynk all ok, coding function as well…
after add terminal widget = not work…
here my coding with terminal widget function…almost 1 week i working on it but still not work hahaha…
// scrolltext demo for Adafruit RGBmatrixPanel library.
// Demonstrates double-buffered animation on our 16x32 RGB LED matrix:
// http://www.adafruit.com/products/420
// Written by Limor Fried/Ladyada & Phil Burgess/PaintYourDragon
// for Adafruit Industries.
// BSD license, all text above must be included in any redistribution.
#include <Adafruit_GFX.h> // Core graphics library
#include <RGBmatrixPanel.h> // Hardware-specific library
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1 // 18TX1 and 19RX1
// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxx";
char ssid[] = "xxxx"; //wifi id change here
char pass[] = "xxxxxx"; // wifi password change here
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600 // 115200
ESP8266 wifi(&EspSerial);
WidgetTerminal terminal(V1);
BlynkTimer timer;
// Similar to F(), but for PROGMEM string pointers rather than literals
#define F2(progmem_ptr) (const __FlashStringHelper *)progmem_ptr
#define OE 9
#define LAT 10
#define CLK 11
#define A A0
#define B A1
#define C A2
#define D A3
// Last parameter = 'true' enables double-buffering, for flicker-free,
// buttery smooth animation. Note that NOTHING WILL SHOW ON THE DISPLAY
// until the first call to swapBuffers(). This is normal.
RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, true, 64); //32X64
//RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, true); // 16X32
// Double-buffered mode consumes nearly all the RAM available on the
// Arduino Uno -- only a handful of free bytes remain. Even the
// following string needs to go in PROGMEM:
BLYNK_WRITE(V1)
{
//char str[] PROGMEM = "TESTING 32X64 RGB LED Matrix 1234567890&*()1234567890";
//const char str1[] PROGMEM = "HELLO";
String() == param.asStr();
int textX = matrix.width();
int textMin = sizeof(String) * -12; // CONTROL NO OF TEXT -12 = UNLIMITED
int hue = 0;
terminal.println(param.asStr()) ;
matrix.fillScreen(0); // Clear background
// Draw big scrolly text on top
// matrix.setTextColor(matrix.ColorHSV(hue, 255, 255, true)); // MULTICOLOR
matrix.setTextColor(matrix.Color333(7,7,7)); //SINGLE COLOR
matrix.setCursor(textX, 1);
matrix.print(F2(param.asStr())); // TEXT LINE 1
// Move text left (w/wrap), increase hue
if((--textX) < textMin) textX = matrix.width(); //textMin
hue += 7; // CONTROL COLOR CHANGE SPEED
if(hue >= 1536) hue -= 1536; //CONTROL COLOR CHANGE SPEED
terminal.flush();
}
void text()
{
matrix.swapBuffers(false); // Update display
}
void setup() {
// Debug console
Serial.begin(9600);
EspSerial.begin(ESP8266_BAUD);
delay(10);
Blynk.begin(auth, wifi, ssid, pass);
matrix.begin();
matrix.setTextWrap(false); // Allow text to run off right edge , false=LEFT TO RIGHT 1 LINE , TRUE=BOTTOM TO UP AND RUN TO RIGHT
matrix.setTextSize(1); // SIZE OF TEXT =1 SMALL , 2/3/4/5 BIG
timer.setInterval(100L, text);
// matrix.fillScreen(0); // Clear background
}
void loop() {
Blynk.run();
timer.run();
}
You already have another topic on this LCD - Can blynk control RGB LED display?
Closing this topic as it is solved.