Maker 101
Published © GPL3+

ESP8266 Educational Coding Board and Modules

I made educational coding board and modules then programmed with ChatGPT

IntermediateFull instructions provided2 hours154
ESP8266 Educational Coding Board and Modules

Things used in this project

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Hot Plate, Convection
Hot Plate, Convection

Story

Read more

Custom parts and enclosures

Bill of Materials

Schematics

Mainboard Designator

Modules Designator

Code

chatgpt_mboard_led_buzzer.ino

Arduino
#include <ESP8266WiFi.h>

const int LED_PIN = 13;
const int BUZZER_PIN = 15;

void setup() {
  pinMode(LED_PIN, OUTPUT);
  pinMode(BUZZER_PIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_PIN, HIGH);
  digitalWrite(BUZZER_PIN, HIGH);
  delay(1000);
  digitalWrite(LED_PIN, LOW);
  digitalWrite(BUZZER_PIN, LOW);
  delay(1000);
}

chatgpt_mboard_pot_servo.ino

Arduino
#include <ESP8266WiFi.h>
#include <Servo.h>

//const char* ssid = "your_SSID";
//const char* password = "your_PASSWORD";

Servo myservo;
int potpin = A0;  // potentiometer connected to analog pin 0
int val;          // variable to store the read value from the potentiometer

void setup() {
  /*WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");*/

  myservo.attach(0);  // attach the servo to GPIO0 pin
}

void loop() {
  val = analogRead(potpin);
  val = map(val, 0, 1023, 0, 180);
  myservo.write(val);
  delay(15);
}

chatgpt_mboard_dht11.ino

Arduino
#include <ESP8266WiFi.h>
#include <DHT.h>

#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);

void setup() {
  Serial.begin(115200);
  dht.begin();
}

void loop() {
  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  if (isnan(humidity) || isnan(temperature)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print("%  Temperature: ");
  Serial.print(temperature);
  Serial.println("C ");

  delay(2000);
}

chatgpt_mboard_drv8833.ino

Arduino
#include <ESP8266WiFi.h>

const int forwardPin = 14;
const int backwardPin = 12;
const int sleepPin = 16;

void setup() {
  pinMode(forwardPin, OUTPUT);
  pinMode(backwardPin, OUTPUT);
  pinMode(sleepPin, OUTPUT);
  
  //put the driver into sleep mode
  digitalWrite(sleepPin, HIGH);
}

void forward(int speed) {
  digitalWrite(forwardPin, HIGH);
  digitalWrite(backwardPin, LOW);
  analogWrite(forwardPin, speed);
}

void backward(int speed) {
  digitalWrite(forwardPin, LOW);
  digitalWrite(backwardPin, HIGH);
  analogWrite(backwardPin, speed);
}

void stop() {
  digitalWrite(forwardPin, LOW);
  digitalWrite(backwardPin, LOW);
}

void loop() {
  //move forward with a PWM of 255
  forward(255);
  delay(1000);
  //move backward with a PWM of 128
  backward(128);
  delay(1000);
  stop();
  delay(1000);
}

Credits

Maker 101

Maker 101

43 projects • 172 followers
Maker 101; Beginner and intermediate level Maker projects!

Comments