ESP8266-01S und Digispark ATTiny85 - Produktvorstellung - AZ-Delivery

In this video, we would like to introduce you to the microcontroller ESP8266-01S and Digispark Attiny85. The technical specifications and differences between both controllers are explained as part of the video. In addition, we show several sample circuits to show how the microcontrollers can be used and how the cabling works.

! Attention: If the video is not displayed for you, you should check your cookie settings. You have to accept cookies so that the video is visible! Alternatively, you can also find it on our YouTube Channel.

Here you will find the microcontrollers presented:

ESP8266-01S

Digispark Attiny85


Wiring ESP8266-01S:

Code ESP8266-01S:

/*
    ___ _____        ____       ___                      
   /   /__  /       / __ \___  / (_)   _____  _______  __
  / /| | / / ______/ / / / _ \/ / / | / / _ \/ ___/ / / /
 / ___ |/ /_/_____/ /_/ /  __/ / /| |/ /  __/ /  / /_/ / 
/_/  |_/____/    /_____/\___/_/_/ |___/\___/_/   \__, /  
                                                /____/   
 Product, data sheet and Pinout at:
  https://www.az-delivery.de/

 Project: ESP8266-01S
 Date: 03/2022

 Link ESP8266WebServer.h: https://github.com/esp8266/ESPWebServer

*/

#include "ESP8266WIFI.H"
#include "ESP8266WebServer.h"
#include "credentials.h"
intimately ledpine=2;

// content of the website
String a= " ";
String out of= " switch off ";
String output="     "
              "

LED control

"+a+out of+"";


ESP8266webserver server(80);
// Optionally define a fixed IP address
Ipaddress IP(192,168,178,83); 
Ipaddress gateway(192,168,178,1);
Ipaddress subnet(255,255,255,0);

void Home page() {
  server.send(200, "Text/HTML", output);
}

void tooggled(){
	
  digital(ledpine, !digital read(ledpine));
  // The start page should be displayed after calling the left
  server.send(200, "Text/HTML", output);
}

void set up() {
  Serial.Begin(115200);

  pin mode(ledpine, OUTPUT);
  digital(ledpine, Low);
  
  Wifi.Begin(SSID, passport);
  Wifi.config(IP, gateway, subnet);

  while(Wifi.status() != Wl_connected){
    delay(500); Serial.print(".");
  }

  server.on("/",Home page);
  server.on("/a", tooggled);
  server.on("/out of", tooggled);
  server.Begin();
}

void loop() {
  server.handle client(); 
}

Associated credentials:

Const Char* ssid = "Meinessid";
Const Char* Pass = "42iStmeinpasswort";

Wiring Digisparkt Attiny85:

Code Digispark Attiny85 (temperature):

/*
    ___ _____        ____       ___                      
   /   /__  /       / __ \___  / (_)   _____  _______  __
  / /| | / / ______/ / / / _ \/ / / | / / _ \/ ___/ / / /
 / ___ |/ /_/_____/ /_/ /  __/ / /| |/ /  __/ /  / /_/ / 
/_/  |_/____/    /_____/\___/_/_/ |___/\___/_/   \__, /  
                                                /____/   
 Product, data sheet and Pinout at:
  https://www.az-delivery.de/

 Project: Attiny85 - Digispark Rev.3
 Date: 03/2022

 Driver: https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip
 Board administrator URL: http://digistump.com/package_digistump_index.json
 Digisparkoled.H: https://github.com/digistump/DigistumpArduino/blob/master/digistump-avr/libraries/DigisparkOLED/DigisparkOLED.h
 Tinydht: https://github.com/adafruit/TinyDHT
*/

// display


#include <Tinydht.H>  
#define Dhtype DHT11     
#define Tempype 0        // use fahrenheit (0 for Celsius)
#define Dhtpin 1          // sensor connected to gpio #1

Dht dht(Dhtpin, Dhtype);  // Define temp sensor
#include <Digisparkoled.H>

void set up() {
  Serial.Begin(115200);
  OLED.Begin();
  delay(100);
  dht.Begin();  // Initialize DHT Tepperature Sensor
  
}
void loop() {

  IF(Millis()%500==0){
  int8_t H = dht.readhumidity();               // Read humidity
  int16_t T = dht.Reading temperature(Tempype);   // Read temperatures
  
  OLED.clear();  
  OLED.setcursor(12, 0);
  OLED.set font(Font8x16);
  OLED.print(F("AZ-Delivery"));
  OLED.setcursor(25, 6);
  OLED.print(T);
  OLED.setcursor(70, 6);
  OLED.print(H);
  }
  
}

Code Digispark Attiny85 (keyboard):

#include "Digikeyboard.H"

void set up() {
  // Don't need to set anyding up to use Digikeyboard
  Digikeyboard.update();
}


void loop() {
  
  Digikeyboard.update();
  delay(100);
  
  Digikeyboard.Sendkeystroke(0);
  Digikeyboard.Sendkeystroke(Key_r, Mod_gui_left); // meta+r
  delay(100);
  Digikeyboard.print("Notepad");
  delay(200);
  // y + z Switched :)
  Digikeyboard.print("Hello from Ay Deliverz!");
  
  // It's Better to use Digikeyboard.Delay () Over the Regular Arduino Delay ()
  // if doing keyboard stuff Because it keeps talking to the computer to make
  // Sure the Computer Knows the keyboard is alive and connected
  Digikeyboard.delay(5000);
}

          
Produktvorstellungen

4 comments

Andreas S

Andreas S

Mit dem ESP hab ich schon ein wenig gebastelt, ein nettes, kleines Teil mit dem man viel mehr machen kann. Besonders mit dem I2C-Bus gibt es viele Möglichkeiten.
Im Video wird der Baustein programmiert, während der D0 auf GND gesetzt ist. Korrekterweise müsste doch der Pin beim Power-Up bzw Reset auf GND sein, damit das Modul in den Programmiermodus hineinbootet. (Tipp: RST-Pin auch über Taster an GND!)
Sollte man nicht einen Vorwiderstand in Reihe mit der LED schalten ?

Andreas Wolter

Andreas Wolter

@Thomas Tasler: wenn kein Video angezeigt wird, könnte das an den Cookieeinstellungen liegen. Unter dem Video finden Sie einen Hinweis dazu. Außerdem einen Link direkt zu Youtube, um sich das Video dort anzuschauen.

Grüße,
Andreas Wolter
AZ-Delivery Blog

Ralf M.

Ralf M.

Den ESP01 kannte ich so noch gar nicht, gerade wegen der kleinen Größe gefällt mir der ausgesprochen gut.
Danke fürs Zeigen und bitte gern mehr von den Videos, sehr gut erklärt!
Beste Grüße aus Hannover
Ralf

Thomas Tasler

Thomas Tasler

Von welchem Video ist hier die Rede – ich sehe nur ein Bild mit Ankündigung, aber ein Video gibt es nicht !

Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. ESP32 jetzt über den Boardverwalter installieren - AZ-Delivery
  2. Internet-Radio mit dem ESP32 - UPDATE - AZ-Delivery
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1 - AZ-Delivery
  4. ESP32 - das Multitalent - AZ-Delivery