Andrew BerryJack DuffSpivey
Published

"You've Got Mail" IoT E-Mailbox with Gmail Notification

How to use a Wia Dot One with a Grove Servo Motor to make the servo lift a flag on a mailbox whenever you get a new email.

IntermediateFull instructions provided12 minutes99
"You've Got Mail" IoT E-Mailbox with Gmail Notification

Things used in this project

Hardware components

Wia Dot One
Wia Dot One
×1
Wia Micro USB Cable
Wia Micro USB Cable
×1
Micro Servo Motor
×1

Software apps and online services

Wia
Wia

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Main Mailbox Housing

This is the main compartment of the mailbox housing

Mailbox Front Face Lid

This is the front face lid to the mailbox that is put on to close in the internals

Mailbox Flag

This is the flag component of the mailbox which is attached to the servo with a screw through the hole and into the bit of the servo. Note: use the screws that come with the servo to avoid damaging the actual servo internals or use glue.

Code

Email Box Code

C/C++
This is the code which is to be deployed to the Wia Dot One
#include <WiFi.h>
#include <Wia.h>
#include <ESP32_Servo.h>

String currentState = "";
String previousState = "";
int position = 20;
int functionButton = 4;

Wia wiaClient = Wia();
Servo myServo;

void setup() {
  WiFi.begin();
  delay(2500);
  myServo.attach(19);
}

void loop() {
  currentState = wiaClient.getDeviceState("emailReceived");
  delay(1000);
  if (currentState != previousState)
  {
    myServo.write(180);
    delay(150000);        
  }
  myServo.write(20);
  previousState = currentState;
  delay(9000);

}

Credits

Andrew Berry

Andrew Berry

17 projects • 1 follower
Jack Duff

Jack Duff

20 projects • 2 followers
Man of the people.Champion of the downtrodden.Marketing magic @ Wia
Spivey

Spivey

70 projects • 43 followers
Tourist in a Tutu || US Born || Melbourne/Mexico/California Raised || New Yorker at ❤️ || SF to Dublin to be COO of Wia the best IoT startup

Comments