Arnov Sharma
Published © MIT

ESP07 Dev Board from Scratch

I made a breadboard-friendly breakout board for the ESP07 board so it can be used for prototyping ESP8266-based projects.

BeginnerFull instructions provided1 hour322
ESP07 Dev Board from Scratch

Things used in this project

Hardware components

Espressif esp07S
×1
PCBWay Custom PCB
PCBWay Custom PCB
×1

Story

Read more

Schematics

sch

Code

Internet Clock

C/C++
#include "NTPClient.h"
#include "ESP8266WiFi.h"
#include "WiFiUdp.h"

#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>

#define OLED_WIDTH 128
#define OLED_HEIGHT 64

#define OLED_ADDR   0x3C

Adafruit_SSD1306 display(OLED_WIDTH, OLED_HEIGHT);

const char *ssid = "addyourSSID";
const char *password = "andYourPass";

const long utcOffsetInSeconds = 19800; //Change this according to your GTM

char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};


WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", utcOffsetInSeconds);

void setup(){
  
  display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
  display.clearDisplay();
  Serial.begin(115200);
  WiFi.begin(ssid, password);

while ( WiFi.status() != WL_CONNECTED ) {
delay ( 500 );
Serial.print ( "." );
}

timeClient.begin();
}

void loop() {
timeClient.update();

display.clearDisplay();
display.setTextSize(3);
display.setTextColor(WHITE);
display.setCursor(13, 0);

display.println(daysOfTheWeek[timeClient.getDay()]);

display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(38, 28);
display.println(timeClient.getHours());

display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(60, 28);
display.println(":");

display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(70, 28);
display.println(timeClient.getMinutes());
//display.println(":");
//display.println(timeClient.getSeconds());


display.display();
delay(1000);
}

Fade for D0

C/C++
int led = 0;           // the PWM pin the LED is attached to
int brightness = 0;    // how bright the LED is
int fadeAmount = 5;    // how many points to fade the LED by

// the setup routine runs once when you press reset:
void setup() {
  // declare pin 9 to be an output:
  pinMode(led, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  // set the brightness of pin 9:
  analogWrite(led, brightness);

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade:
  if (brightness <= 0 || brightness >= 255) {
    fadeAmount = -fadeAmount;
  }
  // wait for 30 milliseconds to see the dimming effect
  delay(30);
}

Credits

Arnov Sharma

Arnov Sharma

310 projects • 307 followers
Just your average MAKER

Comments