This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Credit: https://microcontrollerslab.com/esp32-web-server-arduino-led/ | |
#include <WiFi.h> | |
const char* WIFI_NAME = "BOOM_WiFi"; | |
const char* WIFI_PASSWORD = "076434654"; | |
WiFiServer server(80); | |
String header; | |
String Relay1_State = "off"; | |
String Relay2_State = "off"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int motor_AL = 32; | |
const int motor_AR = 26; | |
// setting PWM properties | |
const int freq = 5000; | |
const int ledChannel = 0; | |
const int resolution = 8; | |
void setup(){ | |
// configure LED PWM functionalitites |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int motor_AL = 32; | |
const int motor_AR = 26; | |
void setup() { | |
pinMode(motor_AL, OUTPUT); | |
pinMode(motor_AR, OUTPUT); | |
} | |
void loop() { | |
// Left |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <TinyGPS++.h> | |
#define gpsSerial Serial1 | |
#define TX_PIN 32 // MCU 32 <---> Rx GPS | |
#define RX_PIN 34 // MCU 34 <---> Tx GPS | |
TinyGPSPlus gps; | |
void setup() | |
{ | |
Serial.begin(9600); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int trigPin = 32; | |
int echoPin = 26; | |
int greenPin = 21; | |
int redPin = 22; | |
int bluePin = 33; | |
long duration, cm; | |
void setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int trigPin = 32; | |
int echoPin = 26; | |
long duration, cm; | |
void setup() { | |
Serial.begin (9600); | |
pinMode(trigPin, OUTPUT); | |
pinMode(echoPin, INPUT); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int pirPin = 4; | |
const int buzzerPin = 22; | |
int pirState = 0; | |
void setup() | |
{ | |
ledcWriteTone(0, 1000); | |
pinMode(pirPin, INPUT); | |
pinMode(buzzerPin, OUTPUT); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int greenPin = 32; | |
const int redPin = 26; | |
const int bluePin = 13; | |
// setting PWM properties | |
const int freq = 5000; | |
const int ledChannel = 0; | |
const int resolution = 8; | |
void setup(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int greenPin = 32; | |
const int redPin = 26; | |
const int bluePin = 13; | |
void setup() { | |
pinMode(redPin, OUTPUT); | |
pinMode(greenPin, OUTPUT); | |
pinMode(bluePin, OUTPUT); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int vibrationMotorPin = 18; | |
// setting PWM properties | |
const int freq = 5000; | |
const int vibrationMotorChannel = 0; | |
const int resolution = 8; | |
void setup(){ | |
// configure vibrationMotor PWM functionalitites | |
ledcSetup(vibrationMotorChannel, freq, resolution); |