How to Get Started – Arduino To ESP32 Part 2

the bottom now you know the pin out

let’s connect peripherals like sensors

drivers and displays esps operate on 3.3

volts while arduinos operate on 5 VTS

this means that all peripherals whether

they input or output ones can only use

3.3 volts when sending data to or

receiving data from the ESP for

components that will send signals to the

ESP like this IR sensor we need to check

if it will output a signal of 3.3 Vols

or lower if the module can operate on

3.3 volts it will output signals at or

below 3.3 Vols which is suitable for

interfacing with the ESP let’s keep

going for components that receive

signals from the ESP 32 like this motor

driver we need to check the data sheet

to know if a 3.3 volt signal sent to the

motor driver is considered as high it

says input high voltage 2.3 volts which

means that the motor driver will see

anything above this as a high signal

nice however some peripherals like this

ultrasonic sensor require 5 Vols most of

the time there are 3.3 Vol Alternatives

like this module but if you AB

absolutely must use a component that

operates on 5 Vols then you can use a

level shifter for example if you wanted

to have an Arduino communicating to an

ESP a level shifter would go in between

and convert the 5V signals to 3.3 volts

and the 3.3 Vol signals to 5 volts this

way we can establish communication

between the Arduino and the ESP let’s

see how the ESP and Arduino communicate

hey

esp32 want to hear a joke yeah what why

did the esp32 go go to the beach why to

surf the net BR so all jokes aside the

communication actually goes pretty quick

just like that now here’s a brief

rundown of the code first we Define the

pins for each board then we start serial

communication for the computer since

we’ll be printing to the serial monitor

they will also need to print to each

other so we begin that one too there’s a

2C delay to give everything time to

fully set up I then initiated the first

line from the Arduino with the print

line command and the ESP has an

statement so when the line reaches the

ESP through the level shifter it will

say received from Arduino and then the

ESP will spit back another line and

they’ll just keep talking you may have

heard of communication protocols such as

uart I squid C and spy different devices

require you to talk to it in a specific

protocol for U the Uno has one port

while the esp32 has three for iqu C and

spy youo has one dedicated Port each

while ESP 32 is a little more complex

many GPI opin can be software configured

for spy or iqu C now onto Wi-Fi and

Bluetooth capabilities the stuff that

really sets the esp32 apart the esp32

can operate in three Wi-Fi modes station

access point and dual mode inst station

mode the esp32 connects to an existing

Wi-Fi network just like a smartphone or

a laptop this mode enables the esp32 to

access Internet services download data

and interact with web-based apis this

gives you the ability to build weather

displays and even integrate GPT

abilities into your projects in access

point mode the ESP creates its own

wireless network that other devices can

discover and connect to you can also

create a web server so that devices can

send information to your es here I

created a network that I connected to

with my phone and by using a web browser

I can access this web server and send

information

wirelessly lastly there’s dual mode

where we can simultaneously connect to

an existing Wi-Fi network and also act

as an access point this means it can

maintain internet access while providing

a direct connection for other devices so

if we had data received from local

devices in access point mode you could

then forward this to a server on the

internet inst station mode or vice versa

ESP also supports Bluetooth connectivity

just like how you comp paare your

headphones to your phone you can paare

your esp32 with any other devices to

transmit information to each other I’m

using an app called Dabble and it lets

me send information from my phone to the

ESP in addition to Wi-Fi and Bluetooth

the ESP has another communication

feature the ESP now protocol it’s a

unique protocol developed by espressive

which basically allows two esps to

communicate this protocol operates on

the Wi-Fi band meaning it’s the same

radio frequency as Wi-Fi but doesn’t

need a router or access point it’s like

Bluetooth in terms of efficiency and low

power usage but has a greater range and

faster data transfer so it sits between

Wi-Fi and Bluetooth so yeah that’s just

a quick briefer on the differences

features what board to get and how to

use it if you’re looking for a high

performance microcontroller with some

Wireless perks the esp32 is a pretty

good Next Step from standard arduinos if

you want to get started with esp32

there’s a link down below and that’s

pretty much all the basics have

fun

Leave a Comment