Hey, for the longest time, people have been asking me "How do I go and build this old
ESP8266 project of yours" and for the longest time, I didn't have the answer.
It was just because I just copied my own awful SDK over and over
and over again.
But now, for most of my esp8266 projects, which are mostly built on esp82xx, I have
some really good answers.
And so, esp82xx is kinda this extra I don't want to say layer, it's not realy a layer,
it's just an extra thing that fits along-side the nonos sdk, which can be built kinda on
top of it kinda underneath.
Umm but you don't really need a lot of it's components except one nice one is the toolchain
that it has.
It's built off of the pfalcon toolchain and instead of having to go through all these
steps and pull down I think it's like 6GB worth of stuff and compile it yourself.
Now, I've already done all of that and it works in the Windows subsystem for Linux.
So what that means is you just go and install Windows subsystem for Linux, which is outside
of the scope of this video and you're left with this terminal.
Now I've already installed it here.
So, a few of these steps are already taken care of.
For one, you might want to update.
Two is you might want to install these packages.
Which, by the way, on the newest ubuntu, they don't all exist.
So, you actually have to do this extra little step there.
Not going to bother with that at the moment.
But what we're going to do is install the actual toolchain to ~/esp8266.
What that means is that's going to put that in your home folder.
It's not going to install it for the rest of the system.
But that's just the default place for it to live.
Most of the projects, by default know to look there.
So, I recommend putting it there.
I wget the file.
And, that's that right there.
That's 20 MB.
Then you untar it to the correct folder inside of esp8266.
So, that's done.
We've just installed and entire toolchain to work with a microcontroller.
Next one.
We're going to install the Espressif official nonos sdk.
That's because some of the projects which use esp82xx want the actual espressif SDK.
I just did that.
That's done.
Next one that you're going to want to do is make sure that you're part of the dialout
group.
And that's so your user can just go flash the device directly.
In Windows or Linux or wherever.
After you do that, you do need to log out and back in.
And we're back.
Now we're back.
We already added that.
And there's a few other notes.
For one we're going to have to specify port.
Because we're on Windows and it's not going to be on /dev/ttyUSB0.
It's going to be somewhere else, like USB 4.
And we can find that out really easily by clicking the Windows button and the pause
button.
Boom.
Like that to bring open the system.
Click on the device drivers.
Then we can look under COM ports, and yes we can see that yes, in fact it is right there.
COM4.
So we can unplug that and we can see that it goes away and if we plug it back in we
can see that it comes back.
And, now we're sure about that.
Next thing that we're going to do is get a copy of channel3 say.
So, for instance if we wanted to download channel3, the broadcasting-television-on-channel-3-from-an-esp8266,
we can say 'cd git' and we can say 'git clone' and paste that right there.
And we would have to say --recurse-submodules, and the reason behind that is that esp82xx
needs to pull--- sorry.
channel3 needs to pull down esp82xx.
And that's already done, so we can say channel3.
And we can say 'make all' and that's going to clean out the library for libgcc, make
a really small one and it's going to build the entire project.
And that's what it's already done.
So, now we have the binaries that we're going to flash to our board here. and here.
:door closes:.
So, now that we have those binaries ready to rock and roll, we can say make burn.
This won't work because it's looking for the port in the wrong place but if we say PORT=
dev tty S4, because that's what it is on this particular system, we can already see right
here.
It should just flash to the device.
Now this is going to flash, I think this is a little bit slow.
So on some systems you can flash a little bit faster, or a little slower.
You may have to edit user.cfg.
And change potentially the baud rate that you're flashing at.
That's just a thing you might need to do.
But we're already done.
So, now we should actually be running on this ESP8266, channel 3.
So what I'm going to do is plug into the little RX pin right there.
It's a little bit difficult to see.
It's actually even more difficult with.
Whatever.
Point is find the thing that says RX, plug this little wire into it.
And then, now, we have a little antenna.
Boom.
That is connected to our USB here.
And we can take our television.
Let's go look at the television.
And we're going to pop over to channel 3.
And see if the thing appears there.
It does not.
Why does it not appear?
:meowing: Hmm.
There is.
:static sounds: Ok.
Anyway, that is how you run at least ESP82xx in this case channel3 on an ESP core.
And this one is the color version.
Aww yeah, look at that color.
Ok.
I guess the other thing that I'm going to want to do in this video is switching over
to running Minecraft on our little ESP8266.
Or at least a minecraft server.
Ok, so in order to run Minecraft, the version of Minecraft that you would need to interface
to the ESP8266 avrcraft, we're going to have to go to installations, we're going to have
to say 'new installation' we're going to have to select from this menu 1.11.
And we'll just call it 1.11.
And we'll say create.
And I'll make sure this fires up first.
Because the hardest thing in this that's going to be most unreliable is making Minecraft
work.
Though at the same time, now that we're waiting, I can say git clone https github .com slash
cnlohr slash avrcraft.
And always recurse submodules.
Boom.
It's getting all of that and it's getting esp82xx.
So, now if I say dumbcraft umm or avrcraft.
cd esp82xx.
I can say make clean all and then I can say I guess at this point I can say PORT=.
AAH!
This is an exmaple of where esp82xx is out of date.
So if I cd into esp82xx, I can say git checkout master.
I can say git pull.
And what that'll do is.
Uhh. git pull origin master.
git pull?
git checkout master?
maybe it was already there.
It was I just had to pull a new copy of esp82xx.
Sometimes esp82xx on a given project is out of date.
Umm, in this case, it didn't work with the Windows subsystem for linux.
So, now I can say port equals dev ttys4.
Make burn.
This did not work because if I edit user.cfg, it was really only written to support Linux,
so the idea is you would just change this number, right here.
But, just by putting the question mark out front, it says if and only if this hasn't
already been written we're going to override it.
And now this command should work.
And it's installing to the esp8266.
I'm going to click here, and connect to the esp8266.
Once it's connected, I can actually cnping 192.168.4.1.
It already is connected.
So, now I'm pinging the ESP, and if I decide to reset it you can see it disconnects, and
reconnects fairly quickly.
So I can click on multiplayer.
Add server.
192.168.4.1.
Done go.
Let's connect to this bugger.
OK!
And this looks like it's running the version of avrcraft with the enderman, and so any
time you hit one of these switches, the enderman moves around.
Now, just so you guys can see this, if you guys are curious how you would change something
let's go do that right now.
So, let's take another peek at dumbcraft here.
Instead of it being an enderman, let's make it someone else.
Spawn entity right here.
Let's take a look at spawn entity.
Ohh we're going to need to use dumbutils.h so spawnentity is going to be in here.
So eid.
So what we can do is google minecraft entity IDs, and see what the enderman is.
Ooph.
Enderman.
And Is that 58?
Oh.
Oh oh oh oh.
So, if we do spawnentity 58, it's enderman right there.
So instead of enderman we want to do enderdragon.
Ok, let's do that 63.
Boom done make burn.
Make all.
Let's make all see if it rebuilds.
It did not.
So instead, let's make clean all burn.
Oops I forgot to specify the port in config or there.
But I can just go back up and say that.
So, now it's reflashing, and as you can see the ESP is disconnected.
But soon Windows iwll automatically reconnect to the esp. :price is right sound:.
Once it's come back online.
And this is going to connect right there.
Unless I'm going to have to eat my words.
I guess, argh.
I did not select connect automatically.
So, now that we're connected I can connect to the Minecraft server, which it will eventually
settle out and do.
BOOM Right there.
Enderdragon.
And if we switch one of these switches.
That's weird.
These switches I tought were supposed to make him fly around.
So, now any time I hit one of these switches he flys around randomly.
So, yeah, that's how you install AVRcraft on this ESP8266.
I hope you guys liked it.
Hopefully this video explains how a lot of this stuff works and uuh.
Yeah, let me know if you guys have fun with any of these projects.