so I'm not exactly sure where I'm going with this video today
I've just been tinkering around with these two ESP 32 base boards just to get
my feet wet a little bit and prove to myself that I can actually talk to them
and send them some code and stuff so let me just show you quickly what I've been
doing so this isn't this isn't a tutorial this is just I figured I'd fire
up the camera since I've got these sort of working a little bit at least to my
level of competency with coding them but yeah let me show you what's going on
with these things so first of all this is the ESP 32 cam it has an ESP 32
module on the bottom here which is the RF and the processor since you little
antenna there an external antenna port and then on top we have a camera which
is why it's called the SP 32 Kim and it's also got a microSD slot there for I
guess when you're in camera mode for putting your pictures on and stuff oh
you can read and write to it input everyone on it so the this one I've got
programs with desoto Arduino blink sketch the standard blink
sketch except for it's got a big-ass bright LED which is intended to be used
as a camera flash when I shut that back off again and that is literally just the
standard Arduino blink sketch the only modification I've done is to tell it
which pin that LED is on which took a little bit of looking up but I ended up
just finding the schematic for the board and looking up where the where the LED
and it's driver transistor there is connected so maybe I should even back up
further the ESP 32 board it's the big brother of the esp8266 family
you know these guys which we are somewhat familiar with where's there's
the actual esp8266 that we know and love there's here's one on a full-sized v1
here's the ESP old one which one has a couple of IP IO ports but that's handy
for some things too there's a low inversion you know there's those things
are all over the place and they're cheap and they're perfectly functional for a
bunch of stuff but the ESP 32 just has more processing in it it's got bluetooth
in it in addition to the Wi-Fi which I haven't played with yet there's a lot of
it there like 90% of these things would just barely scratch the surface and it's
it's a dual-core processor it's 32-bit processor and it's capable instead of
doing things like streaming video which is fairly intense so the easiest way for
most of us beginner types to talk to these things to program them is using
the Arduino IDE some of the boards have a USB connection on the her programming
some don't this one doesn't so I'm just using this FTDI module apparently you
can also use a ch3 40s which I'm more comfortable with but what I've read is
it works better with the FTDI so because I didn't need the hassle I just went
with that so just like any new board in the Arduino world you have to put the
board definitions into it first so a bit of simple google and comes up with this
JSON string which you paste in here with all the other ones just like all the
other types of boards if it add to Arduino over the years and then you
select your board from the board manager and when you Eddie SP 32 as a whole
bunch of different ESP 32s show up tons and tons of them including the ESP 32
cam which we've already got selected and then here is the blink sketch the
only difference is that I've changed it from saying LED bill T and I've change
it to pin four which is where that big LED is then you just upload this exactly
the same as you would with any other Arduino sketch so that's pretty
straightforward and good for us beginner II types now then there's this ole MX e
V there ESP thirty-two EVB that another maker sent me a few months back and I
have just finally got around to playing with it it's a neat little board and as
you can see right now and you can probably hear - I've just got a sketch
in there I'm not a sketch I've got a program in there that's just toggling
these two relays on here and the LEDs that are so seated with them so I'm just
going to reset this board stop that happening because the clicking is
annoying so this board it's an evaluation board EVB it's basically
their way of showing all the different possible things that you can do with
this little ESP chip so it's got a hard wired Ethernet port on it it's got a
couple of relays so there's the tracks for the relays they've got pretty good
separation from everything else which is nice it's got to connect to here for
CANbus yet another protocol that I haven't played with and some little dry
a little driver therefore it will amplify or something
this being open-source saw Hardware the schematic for this is available and
we'll go and take a look at that in a minute or two we've got a barrel jack
for five volts DC in we have connection for a with EMI on battery and there's a
charge management circuitry on there this whole board can run off that but
some of the things some of the functions don't work if you've only got three
point nine or four volts it wants the full five volts so there's a bit of a
caveat there there's the USB input here and there is a
seat 340 or right there I need a better pointer yeah there's a CH 340 and it
total 12 Meg crystal that is a programming port mozzie and miso and and
the clock and all the stuff that goes with that is on there this is all of the
GPIO that this guy provides broken out however on this board because there's
all these other things going on very few of those are left over to be used for
general purpose on this particular board this couple of them but most of them are
also doubling for other things so that might get in the way over here what
you're doing we have an infrared transmit and receive over here we have
an SD card slot reset button and just a general button that goes to one of the
GPIO s and there's the ESP 32 itself and on the back all the GPIO is nicely
labeled there so that makes it handy horn you're messing with this thing big
warning over here five volts only on the barrel jack so being an ESP 32 just like
the brains of underneath this one you can do any sort of programming you want
you could program this thing from the Arduino IDE but part of my tinkering and
experimenting today has been to try just to stretch myself a little bit to try
micro Python Python is just another programming language it's not a compiled
language it's not quite as fast I still damn fast but it's not quite as
fast as compiled C or something else but the benefit of it or one of the benefits
is you can just type commands directly into it on the serial port and have them
run instantly I'm not going to go deep into this this actually does have quite
a bit of information out there on the Internet unexpected makers got a video
series on the basics of using micro Python on the SP 32 I'll put a link to
that somewhere if you want to check that out but this is the official micro
Python website and this is the QuickStart guide goes
through all the different commands to load it in and it even as useless as I
am at code and software and stuff this just worked first try the only thing I
had to change was I downloaded a slightly more modern version mine's got
a 2019 date code on it but it worked exactly the same I just had to change
that part right there and there's also a pretty good reference for getting
started on the various different controls and software and whatnot again
this isn't a tutorial follow along here if you want it's it's relatively
straightforward and again I say that as an old hardware guy who sucks at
software so here I'm just connected I've just got a serial terminal program
running connected to the serial port that this thing happens to be using
which is a virtual USB serial port at 11 v 208 n1 which is the default that it
mentions on the micro Python page and from here I can either start I've got a
command line in the thing just like a command line in any operating system and
just enter commands directly there and then I can turn those pins take control
of any of the digital i/o just like this so defined p0 variable as as being pin
32 which is one of the relays and I defined it as an out so now if I just do
a there's on there's off let's see it happening and here it I think so that
makes it easy for you to test out bits of code and stuff that you're messing
with it has a full file system on it again I don't fully understand these
commands I'm mostly just following the magic footsteps from other people right
now but a lot of this this import stuff is basically the same as
just declaring the includes at the top of it Arduino sketch and then here is
just like in the setup defining the pins and what you want them to do and give
them giving them up and easier to use name so there's the file system on this
one when you first install it all there is there is the boot python which is
just a startup script you can replace that you can add to it but it's right
now basically pretty much empty I have just while I'm experimenting here I've
created a folder called library just to play with it and then I've got these two
programs here that I've created which are these I just wrote them in a text
editor on my computer drop them onto my hard drive of my computer and then used
a command or actually a program called ampie which we have to thank Adafruit
for and it's just a command line program that lets you upload software to the
board I put files rather to the board so this
is the blink this is the one that I was starting that I started off with I've
just defined the two relays and they're LEDs as LED and LED one just because I
was too lazy to change it that much from something I found online and I start
with one of them off and one of them on and then this sort of loop thing here
this while loop turn or inverts them basically it takes the existing LED
value and there's a logical not on it and then writes it back to itself and
then it goes to sleep for half a second and again you've got the two imports up
there looks like as I understand this anyway you don't have to import the
whole library you can just import a function from the library if you only
need that one function just to save yourself some space which is rather
clever so this one here to run it now that it's already since I've got it
loaded on here all I have to do it's import it and it starts running and
because it's got a loop and there's nothing to break out of the loop it'll
just keep doing that forever until I hit a control C and break it or I could hit
the restart on the board to the other one that I've got the other file that I
got and again this is 99% straight out of the out of the examples on the micro
Python website is this one which sets the board up on my Wi-Fi and normally
between here there would be a password but right now just for because of
something else I'm working on I've got my a workshop Wi-Fi with no password yes
that's insecure but it gets shut off every time I walk out of the room with
the master switch from a workshop that also turns off this computer and
soldering irons and the lights and any janky crap that I'm working on so it's
only on very very infrequently anyway this is that that command-line utility
that Adafruit provided that that uploads files to the file system on the ESP 32
ampie you tell what port it is in this case it's TTY USB 0 if you were on
Windows it would become something if you're on Mac who the hell knows you're
on your own and then just put and in the file name you can also specify what sub
directory on the filesystem to put it on you put a file path in here if you want
so I I could upload it as a different name if I wanted to and there it's done
let me just restart my serial terminal and there you see the file that i just
uploaded is there and it's just exactly the same as Wi-Fi connect but if i
import it
so there we go it's jumping onto my Wi-Fi it's using the default MAC address
because I didn't set one I could have in those commands all the rest of this good
stuff whatever and there is the IP address that my router assigned to it
and the Gateway and all the rest of that
and there it is so that's kind of cool I
can I can start that back up and this is still functional by date so I can now
that I've got the so now that I've got the one script running and the the Wi-Fi
is connected I can run other things if I choose to just kill that off so that's
kind of neat and that's in a couple of days of tinkering around that's sort of
where I've gotten myself to on this it's it may not be impressive to to some
people especially people who live in the world of code but this is my reality I'm
a hardware guy and I'm pretty impressed with myself that I can make this
hardware get up and dance at least a little bit so I think I'm gonna leave it
there for now there's obviously a lot more that I could be doing with these
but this is just me getting my feet wet right now I'm gonna leave links to a few
different resources and things that I found in my travels down in the
description and I think probably the next time I pull these boards out I'll
likely be playing with the camera module on there just see if I can get it
working it should be fairly straightforward with that Arduino script
it's there but we'll find out and this guy if anybody's got any experience on
this thing and especially getting the ethernet the physical Ethernet
worked working on in micro Python would be cool but in anything I know
another maker has played with it a little bit and he's got it working he's
got some sample code but it interfaces with an EM qtt server which is beyond
where I want to be right now it's a whole nother world that I don't that
maybe someday but not right now but I'm I just you know want to play with this
thing a little bit further in the future it's designed as an experimental border
as a dev board and that's exactly what I'm gonna do with it as time in my
interest permits anyway um thanks for watching I'm impressed that any of you
made it this far quite honestly if you have any comments or questions by all
means down below as always talk to you later oh I bet some of you were
wondering what that is it is grandpa's sweater oatmeal stout from Burnham er
brewing in Winnipeg is a very nice Irish style stout not as heavy as as Guiness
but quite nice and refreshing