jainr3 / IoTProjects

Collection of IoT Projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IoTProjects

Collection of Arduino Uno, ESP32 projects.

Projects Included:

ESP32 WiFi Car

This project features a ESP32 that can remotely control a small car via a webserver that features a joystick. Because of the variable delay between HTTP request and responses, the car's motors may not always react quick enough and it is possible that it could get "stuck" on a previous joystick command. The hardware wiring and mapping for the joystick to the motor speeds is shown below.

Hardware

Given x and y the leftSpeed and rightSpeed are:

leftSpeed = constrain(abs(y*10) + (x*10)/2, 0, 1023);
rightSpeed = constrain(abs(y*10) - (x*10)/2, 0, 1023);

The direction (forward / backward) is simply determined by looking at the sign of y. A negative y means to move the wheels backward and a positive y means to move the wheels forward.

Mapping

Credits for joystick design

ESP32-CAM SMTP Program

This project features a ESP32-CAM that can send a captured photograph by email to a desired recipient. At the time of testing, the pushbutton was intended to trigger the photograph capture and email, but there were issues with the pushbutton states not being recognized.

Credits for program

ESP32 Bluetooth Low Energy (BLE) Car

This project features an improvement on the ESP32 WiFi Car by using Bluetooth Low Energy to improve the response time between the joystick and the car. In addition, this project uses a client-server model where the car acts as the server to which the joystick module connects to as a client. The joystick mapping is also different than the WiFi Car in that the resting (center) state is no longer (0, 0). To resolve this, the project makes use of the switch button on the joystick module that allows us to toggle between forwards and backwards direction. The hardware wiring and mapping for the joystick to the motor speeds is shown below.

Hardware

Given x and y the leftSpeed and rightSpeed are simply:

leftSpeed = y;
rightSpeed = x;

Mapping

BLE Example Code

BLE Example Code 2

BLE Example Code 3

BLE Example Code 4

About

Collection of IoT Projects

License:MIT License


Languages

Language:C++ 56.7%Language:JavaScript 38.0%Language:HTML 5.3%