Hi, welcome to ESP32 tutorial from Robojax. My name is Ahmad Shamshiri.in this
tutorial we are going to learn how to use ESP 32 with Bluetooth with this
contactless infrared MLX90614 temperature sensors to measure
object and ambient temperature using mobile device or any
Bluetooth device. so when I press it it shows now the object temperature and
ambient temperature in Celsius I can do it also in Fahrenheit and I can do it
also in Kelvin. you can get the code for this by clicking at the link below the
video in the description which will take you to www.robojax.com/learn/arduino
let's get started with this.
I am presenting this tutorial from Canada.
I have introduction video to Milixes MLX90614
temperature sensor where it measures without a contact using infrared and a
full explanation and details of that in the video the link is below this video
in this video. we are not going to talk about that you have to watch that
and install the library for this. make sure it can display the temperature on
the serial monitor of your computer. after that make sure that you install
the driver for this ESP 32 for arduino IDe so you can at least print
"Hello World!" on the serial monitor or something. then we will combine this here
and use the Bluetooth feature of this ESP 32 which already is built-in to
display the temperature on the mobile device or tablet whatever you prefer.
Preparing Arduino IDE for ESP32
in order to start using esp 32 with arduino IDE you need to prepare arduino
ide for this purpose you will copy and paste (the address provided to you) it here you see this package is
the 32 index dot JSON at the end so once you paste it here click OK click OK this
is telling arduino ide where to get the board driver. Then click on Tools-> and then
Boards->Board manager and here wait for this to complete at the bottom this
bar graph. and then type here ESP 32 you see ESP 32 by Espressif Systems this
is installed in your case it will not be insulted you will have install button
here. click on it and it will take maybe few seconds or a minute. and
once the installation is completed click close. now we have to tell arduino ide which
board you're working with because the driver is ready click on Tools-> ports this
is arduino ide which you will usually work but scroll down until you see a
line below that all of these are ES32 and ESP32 Wrover module is the one that
you click and select. and that dot will appear. now we have to select the port
for that we have to find out which port we are using right click on the Start
menu->Device Manager and you see Port click on this arrow to collapse it and
mine is using Comport silicon lab if I disconnect it now you will see that it
will disappear connecting it back so this has COM6.
note that. click on Tools-> Port and you will see COM6 is already selected.
and now you can write your program and run it on ESP32 board.
now your Arduino IDE is ready to work with ESP32
Wiring Explained
let me now explain the wiring. this pin on this side this is VCC using brown
wire I've connected this to that 3.3 volt and in this module also we have the
same way 3.3 volts and if I turn this with the same module that it's at 3.3
volts and the second pin is ground it has been connected to the ground on this
side. and you have ground anywhere you see GND or ground or G connected. just
and the last one is SDA using yellow wire it has been connected to g21 or a
pin 21 and this is SCL the orange it has been connected to g22 or pin 22
and the same way on this module we have 21 in here and 22 here. and the in
this module exactly the same 21 and 22 are side-by-side but there is no G so in
this module they put G GPIO and here I just put without the G so it's exactly
the same but the most important part is that this chip is ESP32.
Code Explained
well let me explain the code as I mentioned you have to install the flight
ready for MLX90614 from Adafruit
the link will be provided this is a text that is displayed on the blue field
screen and here object and ambient and other than that here you will define
the name for Bluetooth to search for when you search for it. if you want to
display the value that is sent from your phone back on the screen uncomment this
otherwise everything will work if you uncomment this if you remove all this it
will also print received what the value and also will printed on the serial
monitor. this when you see SerialBT it will print it back on the screen if you
see Serial.print it will printed on this serial monitor here.
Demonstration
so to start using it first we have to get this Bluetooth terminal if you go to
your App Store search for the Bluetooth terminal and this is a result so select
the one that has yellow and but you can use any other app so I've installed this
and let me open it first make sure that your Bluetooth is active here now it's
deactivated so make sure it is active. then go to this menu devices and then it
will search for the device and will find it I've done different modules so I have
different device and this is the one that is active so now it says connected
here. if it is not connected you can disconnect from here you will see if
they've disconnected and if you touch here connect I've changed the text size
so it can be viewed on the screen if you want to change the text size go to the
menu settings and then terminal and here you can select the font size photo for
whatever size you want. and here I have these push buttons I have defined them.
you will see M1, M2 ... - whatever it was if you just hold it it will display here
I've defined C for Celsius and 1 value and I've selected hex the same way
I have selected for Fahrenheit I typed F and I've selected 2 and their is hex.
and for Calvin I've selected K that's a viewable text the label and that's 3.
so three value of hex is sent. now this is ambient temperature if I press this C
we read that temperature is 29 and ambient it shows 31 and let me get it
closer to my skin because it needs one or two centimeters to measure so without
touch and so now it's says 33.49 and if you
want Fahrenheit that is a Fahrenheit and if you want
Kelvin that's a Kelvin. this device has different version an introduction video
I've explained that they have a lens that is directing it of a different
specification so you can get longer distance but this can work from
one to two centimeter. the further away you put it the wider the angle becomes
like that and it measures not small point but larger area and gets the
average of this area is cold and this is hot so you will not get a proper value.
if you want to clear the screen from previous values just press this 🗑 clear
and it will be cleared. and it's responding very well.
Subtitle Typed and corrected on July 01, 2020 by Ahmad Shamshiri in Ajax, Ontario, Canada
I would like to thank my Patrons from Patreons.com
I did my part to help you learn. Now it is your turn.
Please subscribe to my channel, thumb up 👍 the video and type something in the comment.
My PayPal account link is in the description below if you want to send me cash donation. Thank you.
thanks for watching this for how to use this molasses mlx nine zero six one four
with bluetooth and ESP 32 if you have comment our question please post it as a
comment section below I try to answer and apply if you want to get updates of
my upcoming videos make sure to subscribe
Extra videos
it's gonna start running the text also changes it will tell you what is going
on and if you want to change the rotation
direction you can press it directly or stop it the same can be true here
before Moodle 2