INT 21h

Hi, I am Vladimir Smagin, SysAdmin and Kaptain. Telegram Email / GIT / RSS / GPG

Smooth LED blink on Arduino, ESP8266, etc

№ 11244 В разделах: Electronics ESP8266 Programming от March 8th, 2021,
В подшивках: ,

Human eye can’t see led switching because its too fast, same effect used in old TV and displays with CRT, most of 7-segment indicators and other things. Change timings between on and off state to change brightness and effect duration.

int sv_max=20;
int sv_min=0;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  int pause_on=sv_min;
  int pause_off=sv_max;
  // Smooth turn on
  while(pause_on < sv_max) {
    pause_on++;
    pause_off--;
    digitalWrite(LED_BUILTIN, HIGH);
    delay(pause_on);
    digitalWrite(LED_BUILTIN, LOW);
    delay(pause_off);
  }
  pause_on=sv_max;
  pause_off=sv_min;
  // Smooth turn off
  while(pause_on > sv_min) {
    pause_on--;
    pause_off++;
    digitalWrite(LED_BUILTIN, HIGH);
    delay(pause_on);
    digitalWrite(LED_BUILTIN, LOW);
    delay(pause_off);
  }
}

Нет комментариев »

Weather and time on matrix display

№ 10974. В разделах: Electronics ESP8266 от April 2nd, 2020

В подшивках: , , ,

Wifi manager for ESP8266

№ 9737 В разделах: Electronics ESP8266 Programming от February 13th, 2019,
В подшивках: , ,

In Arduino IDE library you can find wifi manager (https://github.com/tzapu/WiFiManager). It will help you to connect your device to you home wifi without hardcoding credentials.

My projects where used wifi managers:

If you interested check whole tag.

Sample code:

#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>

void setup() {
    ....
    WiFiManager wifiManager;
    wifiManager.autoConnect("my-device-name");
    ....
}

More examples here.

Нет комментариев »

ESP8266 with Samsung VFD

№ 9733 В разделах: 3D printing Electronics ESP8266 Programming от February 13th, 2019,
В подшивках: , ,

Clock and weather on VFD display, wifi networking, NTP synced.

How display looks, search words “samsung vfd 20×2” or “20T202DA2J”

Wiring ESP-01 and display port

You can also check out my library for AVR projects here.

Нет комментариев »

Яндекс.Метрика

Fortune cookie: Today's spam: You won't have to think about birthday presents, when you check our rep1!c@ store!