ESP32 with Arduino IDE
You’ve probably heard of the ESP32. It is a Wi-Fi and Bluetooth enabled micro controller that’s really pretty cool. They’re super affordable. Everybody seems to be using them. They’ve been around for a while. Great community built up around them. And what’s even better is you can program ’em right inside the Arduino IDE. Now me, I’ve been using the ESP8266 for a long time. That’s a Wi-Fi enabled chip also. It’s kind of like, I don’t know, the little brother of the ESP32. That’s kind of one way to think about it. Anyway, what we’re gonna do in this lesson is walk through getting the Arduino IDE set up for the ESP32. Stay tuned. Subscribe to our YouTube channel to get more videos like this. Before we start, just a big shout-out to Altium for sponsoring this video. Huge thanks. You can check the description to get a free trial of the Altium software. All right, so let’s go ahead and jump into this. We are setting up the Arduino IDE to use the ESP32. Now, everything I’m about to show you here is coming straight from the documentation. They’ve got a GitHub page where they’ve got the Arduino core here, and if you just follow the getting started guide over here, it’s basically what I’m gonna be walking through. All right. So definitely make sure. We’ll include the links to these two webpages in the description. But if you have any questions after watching this video, you know, ask in the comments. All right, so here we are in the Arduino IDE. And what we need to do is tell the Arduino IDE where to look for additional boards. So what we’re gonna do is we’re gonna go to preferences and in preferences, there’s this place where it says Additional Board Manager URLs. Now you’ll see I already have a URL in here, right? This is for the ESP8266, which I use a lot. So we need to add another URL. Basically the Arduino IDE is gonna go out and it’s gonna pull down information about different ESP32 boards from this URL. Okay, so where do we get this URL? Well, it’s on that page I was talking about. And they’ve got a stable release link and a development release link. I’m just gonna go with the stable one. Again, it’s just a webpage. It’s going to here. Let’s stick it anyway. Let’s see what happens when we just go here. All right. Okay, so check this out. This is what the Arduino IDE is gonna be pulling down. All right. It’s just a bunch of information. JSON stands for JavaScript object notation. That’s just a way of returning information, right? So all this information right here is what the Arduino IDE is gonna grab and it’s gonna allow it to get the appropriate information so that when you’re like in the board manager and you’re trying to select a board, it looks right. So, okay. So there’s that URL. We’re gonna put a comma, very important. And then we’re gonna just paste that in here. And then we hit OK. All right, nothing blew up. So, so far so good. All right. So now that we’ve got that link in there, now we need to tell the Arduino IDE to actually go out and put those boards into the Arduino IDE. Right, so like when we go to boards here, see how I’ve got these different boards lists here. I’ve got AVR boards, Arduino mega, ESP8266. Well, I need to be like, hey, Arduino, you know that URL I just gave you? I want you to grab all the board information for the ESP32 boards so that I can select them from here. So I’m just gonna click on boards manager and then, hmm, what should I search for? I wonder. Well, yeah, you just search for ESP32, right? Holy, wow. There it is right there. I mean, that’s not too crazy. All right. There’s only one. Man, that makes me want to go make up one and just stick it in there anyway. Okay, so I’m gonna go ahead and click install. Man, might take a little bit. Do you need a printed circuit board design software to move your prototype to the next level? Altium Designer is a great choice for designing PCBs, sharing your design with team members, and even getting your design manufactured. What really kind of blows me away about this software is that even though it’s a super powerful tool, at the same time it’s really intuitive to use. They’ve got helpful video tutorials built right into the software so you can kickstart your learning process and actually get something made. Right now you can get a free trial to Altium Designer with our link in the description. That’s right. You can test drive this super powerful software with a free trial. Just check out the link in the description. All right, now it shows installed. I mean, that wasn’t too painful. So now I’m gonna come up to tools. Now, when I go to Arduino board, I had Arduino Uno selected, but now, hey, look at that, now I can see ESP32 Arduino and there’s this huge list of different ESP32 boards. That’s what we just did. We were able to populate this board based on the information that came down in that URL. All right, now I, you know, obviously there’s lots of different ESP32 boards you can choose from. The one I happen to have is Adafruit Feather ESP32-S2. So I’m just gonna go ahead and select that. Now what I’m gonna do is I’ve got my, I’ve got it plugged in. It’s got an upload speed of 920. I’m actually gonna go to this 1152. Why am I doing that? I don’t know. I’m more comfortable with that number. That seems silly, doesn’t it? But I don’t know. I’m just going with that one. Now, what I want to do is like a smoke test. I wanna make sure that I’m actually, you know, everything’s actually working. So let me go to this port here. I gotta select, okay, this one looks new to me. So I’m assuming this is it, right here. I’ll go ahead and select that one. Now, what I want to do is I want to make sure that this is actually working and I want to be able to upload something. I know there’s an LED on the board. Basically I just wanna write some code that blinks an LED just to make sure that I got this thing working right. All right, looks like there’s an LED at pin 13. So let me just write some code to light up an L E D at pin 13. All right, it doesn’t get much simpler than that. I’m just setting the mode of that pin at LED 13 as an output. And then I’m just using the digital write function to set digital pin 13 high. That should turn the LED on, and then wait a second. And after that, we turn it low. Wait a second. So just your classic blink sketch. Let me go ahead and try uploading this, fingers crossed. Now this Feather S2 that I purchased, it actually comes with circuit Python in there, which I am sure is cool but I prefer programming in C. Nothing against Python. I like programming in Python too but hey. So what you have to do at least on this Feather S2, if you happen to get one of those, is you hold down the boot button and then you press reset while you’re holding boot, and then you release the reset button and that prepares the board so that you can actually upload your code to it. So now when I go to tools and I go to port, it shows up as an EP32-S2 dev module. I select that, and now I can upload my code. So you get this error but all you gotta do is press the reset button. And now my LED is blinking. Well, I hope you’ve found that helpful. If you want to learn more about all this Arduino programming stuff, make sure to check out our try training program at programmingelectronics.com. Also, thanks so much to Altium for sponsoring this video. If you wanna get a free trial of an amazing PCB design software, check out the description, use our link. You can get a free trial of Altium Designer. Also before you go, make sure to subscribe to the channel if you’d like to get more videos like this. Leave a comment if you have any questions or thoughts about this video. And as always, have a great day. Thanks so much. Bye.