Categories
Ai-Thinkers Internet Of Things Microcontrollers

ESP-12F Module by Ai-Thinker

https://github.com/nodemcu/nodemcu-devkit-v1.0

Categories
Ai-Thinkers Internet Of Things Microcontrollers

Ai-Thinkers Modules based on Espressif ESP8266

https://docs.ai-thinker.com/en/esp8266

Categories
Internet Of Things Microcontrollers

Getting Started Node-Red

https://nodered.org/docs/getting-started/

Categories
Internet Of Things Microcontrollers MQTT

Getting Started with Docker Node-Red

https://nodered.org/docs/getting-started/docker

Categories
Dweet.IO Internet Of Things Microcontrollers

Dweet.IO Library

https://github.com/gamo256/dweet-esp

Categories
ESP8266 (ESP-01/01S) Internet Of Things Microcontrollers

WiFi Access Point

Requirements

ESP8266 ESP-01/ESP-01S

Arduino Sketch / Code

#include <ESP8266WiFi.h>

void setup()
{
  Serial.begin(115200);
  Serial.println();

  Serial.print("Setting soft-AP ... ");
  boolean result = WiFi.softAP("ESPsoftAP_01", "pass-to-soft-AP");
  if(result == true)
  {
    Serial.println("Ready");
  }
  else
  {
    Serial.println("Failed!");
  }
}

void loop()
{
  Serial.printf("Stations connected = %d\n", WiFi.softAPgetStationNum());
  delay(3000);
}

Access Point SSID name and password

boolean result = WiFi.softAP("ESPsoftAP_01", "pass-to-soft-AP");

edit the above bold word with your own SSID name and password. Save and recompile your code again.
 

Categories
EasyEDA Microcontrollers PCB Design

Tutorial To Create a New Symbol

Categories
ESP32 ESP8266 (ESP-01/01S) Microcontrollers

Storing Data SPIFFS

Requirements

  • DHT11 Temperature and Humidity
  • USB to UART ESP01 Programmer
  • ESP8266 ESP01/01s (512KB / 1 Mbyte)
  • File System Uploader plug-in installed

Circuity

Code

#include "FS.h"
#include "DHT.h"

#define DHTPIN 2 // the digital pin we are connected to
#define DHTTYPE DHT11 // define type of DHT sensor we are using

DHT dht(DHTPIN, DHTTYPE); // create DHT object

void setup() {
  Serial.begin(115200);
  dht.begin(); // intialize DHT object
  
  // always use this to "mount" the filesystem
  bool ok = SPIFFS.begin();
  if (ok) {
    Serial.println("SPIFFS initialized successfully");
  }
  else{
    Serial.println("SPIFFS intialization error");
  }
  
}

void loop() {
  // Wait a few seconds between measurements.
  delay(2000);
  //read temperature as Celcius
  float t = dht.readTemperature(); 
  
  // Check if any reads failed and exit early (to try again).
  if (isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  //open log.txt file 
  File f = SPIFFS.open("/log.txt", "a");
  if (!f) {
    Serial.println("file open failed");
  }
  // save temperature reading
  f.print(t);
  f.println("deg C");
  //close file
  f.close();
  delay(8000);
}

Resources

https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html

https://thebigpotatoe.github.io/Effortless-SPIFFS/

https://www.arduino.cc/reference/en/libraries/effortless-spiffs/

Categories
ESP8266 (ESP-01/01S) Microcontrollers

Troubleshooting ESP8266

The board stops working when things are connected to some pins

There are some pins on the ESP8266 board that are used for reset functions and for boot mode functions. Therefore, ensure that:

  • CH_PD (EN) is always pulled high because it will disable the ESP8266 when it is pulled low
  • RST is always pulled high because it will disable the ESP8266 when it is pulled low
  • GPIO 0 is pulled high during power up/reset for the user program to run, otherwise the module will enter bootloader mode. It is normally pulled high by the red LED
  • GPIO 2 is pulled high on power up/reset
  • GPIO 15 is pulled low on power up/reset
Categories
ESP8266 (ESP-01/01S) Microcontrollers

NodeMCU (0.9)

Flash Size : 4MB / 32Mbit

Pin Out

PIN MAP