Anon ymous
Published © MIT

Sound a Piezo Buzzer with Blynk and ☒XinaBox

Control any 5V element using Blynk and ☒CHIPS. This project sounds a Piezo Buzzer from my phone.

BeginnerFull instructions provided24 minutes1,662
Sound a Piezo Buzzer with Blynk and ☒XinaBox

Things used in this project

Hardware components

IP01
XinaBox IP01
☒CHIP USB Programmer based on FT232R From FTDI Limited
×1
CW01
XinaBox CW01
☒CHIP Wi-Fi Core based on ESP8266 Wi-Fi Module
×1
XinaBox OC01
☒CHIP High Current DC Switch
×1
PU01
XinaBox PU01
☒CHIP USB (Type A) Power Supply
×1
Buzzer
Buzzer
Any Piezo-electric buzzer would suffice or any element you would like to control
×1
Power Bank or Similar
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Hand tools and fabrication machines

Flathead Screwdriver

Story

Read more

Code

Piezo_Blynk.ino

Arduino
Simply enter your WiFi details and the authorization token into their respective fields and you're ready to upload your code to your ☒CHIPS
#include <xCore.h>                  // include core library
#include <xOC01.h>                  // include high current dc switch libray
#include <ESP8266WiFi.h>            // include ESP8266 library used for wifi
#include <BlynkSimpleEsp8266.h>     // include Blynk libary used with ESP8266

// authentication token that was emailed to you
// copy and paste the token between double quotes
char auth[] = "your authentication token";

// your wifi credentials
char WIFI_SSID[] = "your wifi name";         // enter your wifi name between the double quotes
char WIFI_PASS[] = "your wifi password";        // enter your wifi password between the double quotes

// Blynk function that reads state allows virtual pin readings
BLYNK_WRITE(V10) {

  // call the state selected from your Blynk application
  int OUT0_State  = param.asInt();

  // write the state selected on your Blynk application
  // to OUT0
  // 1 = peizo on, 0 = piezo off
  OC01.write(OUT0, OUT0_State);
}

void setup() {
  // put your setup code here, to run once:
  
  // start i2c commnication and set pins
  Wire.begin(2, 14);

  // start the high current dc switch
  OC01.begin();

  // make unused pins inactive
  OC01.write(OUT1, LOW);
  OC01.write(OUT2, LOW);
  OC01.write(OUT3, LOW);

  // start Blynk communication
  Blynk.begin(auth, WIFI_SSID, WIFI_PASS);
}

void loop() {
  // put your main code here, to run repeatedly

  // execute Blnk operations
  Blynk.run();

}

Credits

Anon ymous

Anon ymous

10 projects • 2 followers

Comments