This is demo project to show how to use the esp_smartconfig package in Flutter to provision ESP32 devices with smart phone.
Gist is follow-up to video:
This is demo project to show how to use the esp_smartconfig package in Flutter to provision ESP32 devices with smart phone.
Gist is follow-up to video:
substitutions: | |
device_name: humidifier | |
device_name_verbose: Humidifier | |
esp8266: | |
board: d1_mini | |
esphome: | |
name: ${device_name} |
WSL2 still does not support USB devices, but with a little effort we can make possible to flash and monitor ESP device from WSL2.
local rfidmod = nil | |
local function init_rfid() | |
if rfidmod ~= nil then | |
return | |
end | |
rfidmod = require('rfid32')({ | |
pin_sda = 22, | |
pin_clk = 19, |
using SimpleHttp; | |
using System.Threading; | |
namespace SimpleHttpDemo | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Route.Add("/", (req, res, props) => |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>ESP32</title> | |
<style> | |
button { | |
padding: 20px; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>ESP32</title> | |
</head> | |
<body> | |
<h1>Hello from ESP32</h1> |
var mqtt = require('mqtt'); | |
var client = mqtt.connect('mqtt://io.adafruit.com', { | |
username: 'ADAFRUIT_IO_USERNAME', | |
password: 'ADAFRUIT_UI_KEY' | |
}); | |
var ssd1306topic = `${client.options.username}/f/ssd1306`; | |
client.on('connect', function() { |