1. Trang chủ
  2. » Giáo Dục - Đào Tạo

EXPLORE ESP32 MICROPYTHON python coding arduino coding raspberry pi ESP8266 iot projects android application projects

347 54 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Explore Esp32 Micropython Python Coding, Arduino Coding, Raspberry Pi, Esp8266, Iot Projects, Android Application Projects
Tác giả Akira Shiro
Định dạng
Số trang 347
Dung lượng 28,93 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

TABLE OF CONTENTSPYTHON VS MICROPYTHON - COMPARE & ACCESS MicroPython for ESP32 INTRODUCTION INSTALL PYTHON 3 INSTALL THONNY IDE INSTALL PUTTY SOLVE PORT IS NOT DETECTED DEVICE DRIVERS I

Trang 2

EXPLORE ESP32 MICROPYTHON

Python Coding, Arduino Coding, Raspberry Pi, ESP8266, IoT Projects, Android Application Projects

By Akira Shiro

Trang 3

TABLE OF CONTENTS

PYTHON VS MICROPYTHON - COMPARE & ACCESS

MicroPython for ESP32

INTRODUCTION

INSTALL PYTHON 3

INSTALL THONNY IDE

INSTALL PUTTY

SOLVE PORT IS NOT DETECTED DEVICE DRIVERS

INSTALL MICROPYTHON ON ESP8266 ESP32

HOW TO GET STARTED WITH MICROPYTHON

ESP32 MICROPYTHON WITH RASPBERRY PI

ESP32 MICROPYTHON WEB SERVER

CHANGE ESP32 WIFI CREDENTIALS FROM MOBILE

Download the MicroPython firmware

FLASHING MICROPYTHON USING THONNY IDE

FLASHING MICROPYTHON USING ESPTOOL

FLASHING MICROPYTHON USING ESPRESS-IF TOOL

DEVELOPING AND DEBUGGING ESP32 IOT APPLICATIONSUSING ESPRESSIF ECLIPSE PLUGIN

Trang 4

CREATE WON FUNCTION

ESP32 TUTORIAL USING MICROPYTHON LETS GET STARTEDE4HOME AUTOMATION USING WEBSERVER ON ESP32 SENDINGHTML PAGE DNS MDNS ESP32

BLINK AN LED

ANALOG TO DIGITAL CONVERSION

CAPACITIVE TOUCHPAD

DHT11 -TEMPERATURE AND HUMIDITY

ESP32 INTERNAL TEMPERATURE

ESP32 INTERNAL HALL EFFECT SENSOR

Trang 5

PYTHON VS MICROPYTHON

-COMPARE & ACCESS

Programming is something that every modern makers should have some

grasp Figuring out exactly what program is best for your particular purposecan be half of the battle I've had a chat previously about programming, but as

an overview programming is simply the process of creating instructions for acomputing device to comprehend and execute These instructions are referred

to as a software Once the software program is run, the computing device willperform the specified task The programming language is a set of commands,directives and other syntaxes, which gives you a vocabulary to create thesesoftware programs Now Python and micro path and our power house

programming languages Each language can support your programming

needs to almost the limits of your imagination Both languages are

transportable open source growing in popularity, comparatively, easy to use.And free They also have similar syntax, keywords and operators So howexactly do they differ from each other? Get up, get up, get up, get the fuck

up The biggest factor is that Python because of its intensive processing

demands requires a full-sized computer Laptop or cloud server to run

effectively in Harrison, the hardware requirements of micro path and up

orders of magnitude lower This means macrobiotic can operate effectively

on microcontrollers and microprocessors to clarify a microcontroller is acompact integrated circuit designed to govern a specific operation inside anembedded system to the table I brought an Arduino UNO Which is a perfectexample of this A microprocessor on the other hand is an integrated circuitthat contains all the functions of a central processing unit of a computer,

which includes an operating system Demonstrate this I brought to the table,

a raspberry PI full model B eight gigabytes, which is a perfect example of amicroprocessor Both these devices can easily fit in the Palm of your handsand encourage and makers, rainbows of creativity Now with most recent

Trang 6

modern technology, this concept of micro Python for credit card size

computers, whereas Python for lodge, computational devices This concept isjust not become so cut and dry Some micro processes have become so

powerful They can functionally run Python The newest rush reply for model

B eight Gigabytes is a perfect example So does it take to make a streamlinedslimmed down Python? Start by ripping out, hates the libraries leaving only asubset of library A module is a Python object with an arbitrarily named

attribute, which you can bind and reference Simply a module is a file

consisting of Python code A library is a collection of a whole bunch of thesemodules Furthermore, of the few libraries left, remove unnecessary functions

in classes that come with Python A function is a bulk of code, which onlyruns when it's Clauses are essentially a template to determine variables andfunctions of objects Objects are simply collections of data Some featuresthat will not cater well to constraint systems also removed And some

freedoms with syntax are eliminated This is a simplification of what DamianGeorge, an Australian program and physicist did in 2014 Turning Pythoninto what we see today as micro Python These changes mean micro Python

is an extremely compact programming language takes up less than a

megabyte of storage space And underload utilizes only around 16 kilobytes

of Ram If you're interested in each and every detail at a highlight Come take

a look at the write-up on this topic, where I go very deep into this jumpinginto the computer You can see on one of the core electronic website, here's aparticular write-up And if you jump on deep dive on differences betweenPython and micro Python, it will talk about the real nitty gritty details

Between path and a micro Python, both Python and micro Python,

programming languages are free to download and use jumping over here.You can see where you can download Python and jumping over here Youcan see where you can download micro Python They also open source sothat it gives individuals the freedom to modify, contribute, and propose

improvement There are also online Browser-based emulators for both

Python and micro path And so you don't even need to download anything toexperience these languages Also, if you're interested in micro bullets thatwill run micro Python brilliantly, come back to that webpage that I showed

Trang 7

you before and under micro Python compatible bullets, you'll see a wholebunch of micro bullets that will run Python.

Trang 8

MicroPython for ESP32

This is indeed the coveted just before lunch slot Um, so if any of you feelyourself kind of slowly slumping over, I won't take it personally It's Theway these things go So I'm here to talk about the ESP 32 port of micro

Python U m, we've, we've talked about, um, micro Python as a, as a projectoverall from Damien talked about some specific application of micro partsand is a great way to prototype stuff I'm Anna and I'm coming, you're talkingabout this ESP 32 port, which I'm really, really excited about So it's great to

be able to come and talk about it to you Um, There's some background aboutmicro Python, but it's probably not all that necessary since we've already kind

of covered that fairly well But for anyone who wasn't here before, it's a

reimplementation of Python I'd say it's a Python because it's very much likeall the other pythons And if you know how to program Python, you knowhow to program Miko Pathan, it runs on small controller boards of variouskinds, including the PI board and the micro bit And these ESP 82 66 systems

on a chip that have become very popular recently And now it's got a port tothe ESP 32

Trang 9

What are those chips? An ESP 82 66, which you can't really see because it'sall Pretty horrible, um, is a small system on a chip featuring on board wifiand various other peripherals Um, they kind of first, uh, actually, before I getonto that, they're made by a company called expressive who are a fabulousmanufacturer Um, I think the thing that makes espresso particularly

interesting as the, one of the first of the Chinese manufacturers to really

embrace the open source world, they're very active in a, an open source

community They're very supportive of our open source development efforts

Um, and that's really great And I, um, I think that's been a great advantagefor them as well Uh, the 82 66 became a real enthusiastic stream, partlybecause it's very powerful thought it is partly cause you could get them forlike $2 Um, And the has learned a lot out of that They've taken a lot of

inspiration from the things people have done with 80 to 60 Sixers, many ofthem fairly silly, but nonetheless people have had a lot of fun with them.People have tried a lot of things People have put a lot of interesting stufftogether and the company has been able to learn from that and combine a lot

of that knowledge into the ESP 32

Trang 10

So as I mentioned before, the HQ 66 came to prominence, um, as a Uh, wifi,accessory for Arduinos and things like that until somebody's looking at thespec sheets realized it was well, several times as powerful as the Arduino, itwas helping out And that this relationship seemed a little silly and that

perhaps we should just develop directly for the 82 66 instead, it's got a

reasonably nice, uh, sea-based um, SDK It's not that hard to get started in.But there is a bit of a barrier to entry there Um, and thankfully someoneDamien ported, a micro Python across to it I discovered this, I just starteddeveloping some stuff ready to 66 I got really fired up about it after Linuxcon Jalong I think it was got really excited about this whole 82 66 chip andwriting See again, and I hadn't written C in ages and Just as the novelty andexcitement of writing, see again, was starting to wear off My copay thingcame off out So I let upon micro Python and went, this is the coolest thingever Um, and I got more into it and I got more into it I got really excitedabout it And then I started working on it sort of just with it And then I

started running C again to work And so the cycle, but never mind So yeah,following up on the 82 66, there's now the ESP 32, as I said before, it's taken

a lot of inspiration from what people have done It's more powerful Again,there's two CPU because instead of one CPU core, there's an ultra low power

Trang 11

processor, which is a really cool little accessory That's really just like a, uh,

uh, very small, very slowly It's just got enough power to wake up the otherCPS, if something interesting is happening and if you're running on a battery,that's a really important thing Runs a slightly faster clock rate Most

importantly to us, it's got a heap more Ram five 20 K does not sound like agreat amount of Ram to a modern developer Um, I installed some software,

uh, yesterday to do the machine learning things that downloaded Um, I

wasn't an a half a terabyte or something of data onto my laptop just to install

Um, but you It's enough to be usable for, for Python, for micro Python, one

60 K headroom on the ADC 66 isn't is plenty enough to run micro Python,but your applications tend to bump into that limit fairly easily The five 20 Kgives us a bit of bit of breathing room It's also got a bigger flash, which isreally nice These devices are much less powerful than something like an RPzero w which is the next sort of thing up that you might be thinking of That'sthe wireless PI zero, uh, that's a much more powerful CPU running at a fasterrate It's got a lot more memory It's got a lot more ability to expand with,with flash and things like that But yeah, provide a little middle ground It's

an interesting market segment That's kind of opened up between the eight bitsort of Arduino AVR world and that RPO world Um, the 32 is very

interesting because it features as well as the wifi that you know about

It's got a Bluetooth, um, which is really handy A lot of things these daysspeak BLE of various kinds is great for talking to mobile devices and othersensors and things like that It's got more IO lines than the 82 66, which isreally handy It's got more than one analog input Um, as Anna mentioned,there's only one analog input on the Uh, 82 66, which you can get a little bitannoying at times Uh, the ESP 32, you can configure like eight of them andyou can actually change them between pins, which is kind of cool Um, it'salso got a digital analog converter, which has kind of handy, uh, pulse withmodulation of various pins They've done a really interesting thing They'vebuilt a capacitive touch sensing circuit Into the thing And so there's eightcapacitive touch sensors So if your project wants to have a, a touch interface,rather than a button interface, it's really easy You don't need any externalcomponents, just a piece of copper, um, which is a really good feature

Trang 12

It's a really interesting, it tells you something really interesting about theirapproach This may not be the cheapest system on a chip out there, but if youneed no other chips on the board, They can still compete So it's a really

interesting little way of thinking about it And similarly, there's that ultra-lowpro power processor and there's even things like there's a whole effect sense

of built into the chip I think that's pretty cool Very few people need it

However it's there It's easy to make It's just another piece of Silicon on thedie If your application does, for some reason, need a high current

measurement device, you can just lay your board out so that the processor hasthe power line running right past it And you'll see a signal on that hall effectsensor That's kind of cool One less component again

A group of Russians called Zerto bars, a very good at boiling chips in acid,

um, and taking photos of them under a microscope So this is actually a

picture of a decapper ESP 32 Um, It gives you some idea of, of just howcrazy the architecture of these chips is

Trang 13

If you zoom in on that top corner there, you can actually see the circuitry ofthis thing, the coils and the stuff to make a hardware radio I think that's quitefascinating that you can actually do this You can make coils and wiring andcircuits out of Silicon that are right there on the die.

And it's actually quite beautiful in a strange and I have no, it reminds me ofmaps in those old games, like quake and things like that with the circles and

Trang 14

paths and all that stuff It's really amazing that this is a thing we can do thesedays I think you normally

wouldn't buy it as a individual discreet little piece of Silicon because frankly,the pins are far too small and you can't even see them, but they're available asthese sort of modules, which are much easier to solar they're on a 20th inchsort of picture on the edge

So you can actually hand sole to them If you Work at it Um, and they'requite a handy little chip that a little RF screen that tab on the top there isn'tbuilt-in antenna So you don't even need to deal with anything that isn't like adigital 3.3 volt line Um, Oh, sorry And the, the flash memory is, is underthat little can as well So, um, it's all, it's all basically there for you to use It'squite easy to work with that kind of thing

Trang 15

If that seems also a little bit too hard to Um, deal with, in terms of soldiering,there are lots of these boards available, um, from various manufacturers.There's a Spock fund one there in the middle, which has got a integrated

battery controller

The other ones is Ida fruit Oh, sorry that one's a dev kit Say the other one is

an Ida fruit fair Uh, you, I should know that Does it say it in tiny little

letters? No, it doesn't Um, One of their Huizar ranged maybe or somethingit's got an onboard battery controller as well The better control is, as Annasaid, a very, very handy, if you want to have some kind of portable device,cause it's something that's quite easy to get wrong

So having a board that has that on there, so you can just plug a lipo in is

really handy Um, so they're really good in those, the standard headers aroundthe outside, it makes it very easy to get started on this stuff and prototypestuff together with little wires Um, All right

Trang 16

So that's the module I, it was just talking about community since we're here.One of the things about conferences is they're very much about the

community and over, about having a community I think it's really importantthat we have a micro Python community, that we have a Python communityand a micro bison community within that Um, and in ESP 32 microbiomesand community within the micro Python community

I noticed this news article the other day, um, Intel launched with great fussand excitement, the Galileo platform and all of this sort of stuff And it wasgoing to take over the world of IOT and everything is going to be fantastic.And lots of people have them and yeah, it's all going to be beautiful

And there was no real community behind it And so whatever it was a yearlater wind hadn't really taken off and everyone's looking at their watch goingout Did we do anything cool with that? And then, or NICU, they just shelved

it just like that bank So anyone who spent a lot of time and effort and stuff,developing stuff or learning about that platform, it's kind of a separated fromunder you, which I think is really disappointing

I mean, it wasn't nice platform It's just, it was a good idea, but unless there's

a community, a single company, can't push a Platform along well, they canfor awhile, until I lose enthusiasm that they can't make it a global thing So itneeds to be more than that It needs to be a community of people And that's

Trang 17

something I'm really trying to get going with micro bison as well.

Um, so where are we at with micro? And so I talked here last year, possiblythis very room about, um, uh, ESP, 82, 66 micro bison Um, and there was alot of fun And at the time there was select much muttering about this newESP 32 Those modules actually finally started making it out onto the market

in about November

Um, and then they promptly disappeared off the market Again, every singleone of them sold And then they appeared again here and there in dribs anddrabs And Everyone responded to this in the sense of a way by ordering asmany of them as they could possibly get hold of And then they immediatelywent out of stock again

Um, and finally I got hold of my first ones in November and we could startworking on stuff Um, Damien got hold of his as well, apparently aroundthem Um, because the initial ports, uh, dates back to December, uh, which iswhen the ripples started to actually work, um, I can't actually read it I'm notvery good with dates and times, but I am pretty good at typing

Get logged into the terminal So it around December, somewhere there Uh,and then I ended up coming across and doing some work on the project withDamian to get the wifi Stuff going and TCP sockets and some more supportfor other GPIO functions then And that work, that, that initial work on this

Trang 18

port, um, I'd just like to thank microbic for sponsoring that work.

Um, they helped make that possible to get that off the ground As a, anotherport started on ASP 32, they make a really cool little robot called the Edison,which is pictured there, which had a little educational robot thing So I justwanted to say thank you to them and give them a little bit of a, uh, thank you

From there we went on and we actually finally admitted we were doing thisthing and stuck it up on GitHub Um, which is great because it made otherpeople leapt all over it And then I went down to limits coffee, Tazzy to kind

of like, you know, launch it Wow It's a good excuse Isn't it? Um, we wentdown there and at limits comp, we had support from expressive to make, uh,

a little board called an IO tos, which is this thing pictured, um, Which has alittle, uh, our led display and it has a joystick and it has an ESP 32 on top andall of that sort of stuff

And, uh, as I'm working up to my talk about how to develop C code for theESP 32, I got up on stage and said, ah, look, unfortunately we haven't

actually got microplasm booting on the IO tos yet And so on And the car put

up their hand and said, Yes I have Oh, right Okay Excellent So, um, we didindeed get that running on the Iotas, which was cool

Um, and Jaya who's probably around here somewhere I got it working with

Trang 19

the Neo pixels on the board and people added more stuff and suddenly wehad a snowball rolling, which is brilliant It's this community thing I'm

talking about is that we've suddenly got multiple contributors It's not just oneperson or two people or three people pushing this thing along

It starts snowballing So that's really exciting We went from software SPI tohardware SPI, which was a great start Um, other functions appeared

Someone said, why is there no PWM? And I said, of course there's PWM.And I said, no, there isn't I mean, Oh yeah, I didn't write that after all I

thought I had Oops

So someone implemented that, which has great, Andy Valencia there, um,you are support arrived So now you can talk to all three you out on the

board Um, Which is another thing that took me by surprise When I

discovered I actually had three U arts, which was kind of cool, uh, and otherpeople are adding more support all the time

I've mentioned a few names here There are many, many, many more

contributors, um, in the, in the thing get logged as your friend But I just want

to emphasize the fact, this is becoming a community thing This is becomingsomething that is bigger than just a couple of people And here we are atPython again,

Trang 20

what's in progress Uh, So the ESP 32 also got used on a badge at a

conference in Amsterdam, I think, or near Amsterdam anyway, uh, calledShi, uh, and the whole bunch of people from that, uh, community have beenputting a lot of effort in it, on things like, uh, Bluetooth, Ellie, and, uh, I thinkthe same people are involved in the deep sleep thing

I can't remember now Uh, those are pull request numbers, uh, and thosethings are waiting to kind of get merged back into the main line of a VSP 72micro Python But once that's working, it'll support, uh, Bluetooth ele it'lldeep be able to deep sleep so that you can run it off batteries and it can wake

up, do some thinking, go to sleep again

Um, There's some more sophisticated PWM control available on the chip

Uh, one of the fun things about this is, is that espresso for kind of doing a lot

of their development of their SDK Very publicly This is very unusual, butthey've released a very early SDK and they call it an IDF, um, IOT

development framework

They released it quite early with a lot of things missing, and then they slowlyadding those things bit by bit Which is a little challenging at times for ustrying to keep up with, with their development But it's really exciting as wellbecause every now and then you'll discover a new piece of hardware is nowavailable

I, we also need to have at some point some support for that ultra low powerCPU, because that's a really exciting piece of hardware for anyone who wants

to run stuff on batteries and a really exciting thing That's just suddenly

become a thing recently Um, Is to attach more Ram to this thing So there's anew chip coming out from espresso or a new module coming out from

expressive soon, which has got four megabytes of onboard, um, Ram serialattached Ram

So it's just attached to, um, the internal bus of the, the module and I think it'sreally exciting Can we make micro Python use this big slice of Ram? Youknow, if we've got more Ram available, can Python use that? And I've beensort of looking at it and poking gently at it And just before this talk, Googled

it again, and someone's in the meantime implemented it

So that'll be really, that's, that's pretty amazing It's um, something we have to

Trang 21

now look at how to integrate that back into the main line of, of micro

Pathans So it's not to make it too much of a fork, but it's really exciting that

we can now address That much more Ram And if you look at the dev kitsand things like that, a lot of dev kits have a pixel map, display of one sort oranother

Iotas had a display The dev kit from expressive has one, the badges all tend

to have maybe an ePaper display Um, they did, it would help lot I love tohave a kind of standardized frame buffer approach that would work acrossmultiple of those devices So everyone doesn't have to reinvent how to do thisevery time

Um, Probably a much lighter approach than you'd normally use for like a webtech or whatever, but like come up with something So those are all thingsthat are kind of in progress at the moment

So we've got coming up, we've got a, um, a sprint signed up for Monday

Um, that's really exciting I've never actually kind of run a sprint before or,

or, um, Participated in a Python sprint

Um, but I'm hoping it will let us achieve some really cool stuff Um,

expressive or very kindly provided some support for that There's a wholebox full of, um, ESP 32 dev kits, uh, for people that can contribute at the

Trang 22

spring Um, if you happen to have a sprint ticket for Monday, please do comealong It will be a hoot.

Uh, I think it's not just, I mean, micro itself is written in seat So you need afair bit of C programming ability to, um, make much progress within the guts

of micro Python But if you do have some C background, it's actually very,very easy to work on So, um, uh, partly I guess, because it's relatively

recently implemented and it's implementing quite a modern way and it's.Quite well-documented internally and all of that sort of stuff It's, it's a nicecode base to work with But the other thing is that there's a lot of work thatstill needs to be done on this platform in passing, uh, and okay A lot of workthat needs to be a feedback that needs to be done about how do we make this

a better Python platform?

How do we keep our classes in our libraries? As pathetic as possible withinthe scope of, of micropayment Um, so there is a definitely a role for peoplewho aren't see people as well within that sort of spring and all of that Andit'd be great to come and hang out and just, you know, get a chance to talk toeach other about what we're interested in doing and so on and so forth

Um, Tim who is around here somewhere or another, Oh, up the back, Tim.Hey, Tim, uh, has also got an SPGA board,

Trang 23

uh, port of Micro Pythen that he's interested in doing some work with onMonday Uh, that's basically running micro bison in a little soft core within

an SPGA And so there's a whole Python tool chain there, um, that lets youconfigure the FPJ from Python and then program the actual running of theFPGA in Python and so on and so forth

It's a really interesting effort Um, I don't think Tim is talking about it thisyear, but you talked about it at Linux con, right? Have I got my timeline?Right?

Right which one I'm talking about, I'll post that link as well Um, so there'sthat And the other thing I wanted to just mention is I'm, uh, running or

organizing a micro path and meetup group here in Melbourne, uh, at, uh,connected community hackerspace, which is just opposite Swinburne

Um, that gives you a chance to come along and just meet up with some

fellow enthusiasts and, uh, do some interesting kind of work It's very

hands-on space, there's machine tools There's things like that Um, Play aroundwith hardware, have a bit of an experiment, get to know the platform, not souseful for those of you out of state, but for people who are around here, ifpeople are interested in running a similar thing anywhere where you happen

to be from, I'm happy to help out with information about that stuff too, andhelp get things started elsewhere

So cool That's about all I had to talk about In terms of this stuff Does

anyone have any questions about these P 32 port or about my career path ingeneral?

um, I'd heard that there were some issues with the actual Silicon in the ASP

32, in terms of some of the functionality, is that, uh, or maybe you couldcomment on sort of just give an update in terms of rev one Silicon out now

Uh, so you could say that that would imply that there isn't a totally perfectthing in rev, zero Silicon

I don't know, specifically myself I haven't bumped into, into the problems,but then my, my stuff has occupied a relatively small part of the Silicon SoI'm not sure Um, yep

Thank you, Nick Um, What's the development experience like, um, on thesechips, I know it's juicy, it's a GCC port, but is there a good GDB, um,

Trang 24

interactive debugging, things like that? Uh, I'm I've been strictly off in theworld of, uh, print statements, um, and logging Fire that via the serial port.You're glad to get those out working.

Uh, yeah, so I haven't actually tried using GDB on it Interestingly though,the dev kit J or whatever, it's called, not the dev kits to see little ones, but thebig ones have a tag port and things like that on them So, and I think I'm not ahundred percent sure, but I think what's on there is so there's a Juul, a USBconverter

And one of them goes to the standard serial ripple kind of port that we useand that you flash the chip through it I think the other one actually goesthrough to the, uh, jaytag port or something similar like that So there's somecircuitry there that I don't yet understand, um, that I think will let you do thatdebugging over USB rather than actually having to get out the, the, you

know, old Xilinx jaytag cable or whatever you've got

Um, Uh, so far though, I haven't bumped into too many things that aren'tsolvable that way Maybe I've just been lucky

Trang 25

I like to introduce you to the coast Micropattern for everyone using ESP 32

or ESP two double six, micro biotin is a lightweight version of Python

programming language designed for microcontrollers We use ESP 32 as thedevelopment board for the school USPA two double six Also can use tolearn 80% If you are new to embedded system or, you know, Python

language you want to learn and burdensome

Don't worry about this bulky wiring based around the projects the SACCRdiagrams are provided for you

Trang 26

That is the default And this is plenty with the 0.2 seconds at the end, this one

is blending with one second each and every Lydia is bringing into differentspeeds Multithreading as well

We mainly use Windows operating system to explain this project, but at thesame will support for Mac operating system as well as Linux operating

system We'll also discuss how to solve if the port is not detected in sessionthree, we'll be flashing microbiota and firmware to ESP 32 The same willwork for the ASPA two w six in session four

We'll be discussing about Python three syntax If you already know by tenthree, you can skip this session in session five That is very important

Session of the scores will be controlling the GPA pins starting from bringing

an led to multithreading You can see here, which having them yellow colorthat only work with ESP 30

We know that ESP 32 or ESP do double six How by Fe connectivity, thesession And we'll be able to auto-correct by fan into, by using ESP 32 orESP, a two double six If you have ESP, w six already, you can start withthat We need an DST 11 center module to measure temperature and

humidity I used LD T3, voltage regulator to regulate the voltage to 3.3 volt,

10 kilo on potential meter Phew One kiloohm resistors, 10 to 50 mil jumbowires, a mini breadboard Very most important part here it is Micro USB

Trang 27

cable It should be a good quality cable This will be a kickstart to microPython.

Trang 28

INSTALL PYTHON 3

Let's check vitamin three is installed in your PC using command prompt typeCMD in the search bar So command from this loaded type Python space,hyphen version

So I do showing like Python is not recognized We have been installed bythen to this day Open a browser and go to biotin.org

Trang 29

Yeah, you can download vitam version So it is available for windows,

Linux, and max So it automatically detects for the operating system itself

So click over here or it can go to other operating systems and download So I

am just clicking here

Then it will get downloaded to your download folder in the case of windowsoperating Go to download folder by 10 is downloaded Rightly not as anadministrator click on add by ten three point eight two-part install

Trang 30

Wait for a few minutes, you have sex as fully insured by country in your PC.Let's say by tennis installed successfully closed this week No, go to

command prompt by typing CMD Check it again by 10 in salt So by tenthree point eight 0.2 is installed That is showing right now So you havesuccessfully installed by then 3.8 0.2 let's check is the five 10 is working So

to log the biotin type Python here So now the Python Shelly's Lauder Bryncommand Come in is over So it should have drained welcome to

microbiomes and goals Let's see So it is spender That means biotin 3.8 0.2

is successfully installed In some cases, when we died by 10 or when wecheck biotin version, then it will show the is not set In that case You have toinstall the part Let's see how to set the pot up on command drawn

Trang 31

Check where the Python is installed by using ware by 10 So this shows thepart of the bite and where it is installed It is installed app data, local

programs Copy this right-click on PC Both the properties, where do

advanced system settings go to environmental variables,

go to part here and here you can click on you and you can pace the part hereyou can click on Okay So that is a way you can set apart Once you set apart

Trang 32

again, open command, bro Check it is installed.

Trang 33

INSTALL THONNY IDE

We need an ID for scripting and managing microbiomes and code In thiscase, we are using Tony ID Let's install, Tony ID to easy open any of thebrowser, go to tony.org

Tony ID is available for Mac windows, as well as Linux operating system.Here you can download based upon your operating system In this case, I'mgoing to download

Tony for windows operating system Just be here in the case of windowsoperating system for other operating system, you can choose So just click,then it will get started Downloading, go to download folder Tony ID

application is downloader

Trang 34

Right? Click on the application, click on DNS and administrator click onnext.

Accept the agreement, click on next browse to a proper drive So I'm keeping

it as a default Click on next and you can create an desktop icon by clicking.Here we go next And just install it Read for a few minutes Tony ID issuccessfully installed Click on finish

Tony ID shortcut is already done Right turn in the desktop

Trang 35

Always You can tell us from the Double click on the icon, pick on thatscope So if you have another language, you can choose that Tony ID

successfully loaded

So by default, Tony ID comes with biotin 3.7 0.7 by default Python is aloaded here We'll check A default Python is working using print command

By 10 is working here So this is the shell This is the potential Linda Tony

ID will change the default interpreter later to use microbiota for ESP 32 orESBA two WCX

Trang 36

INSTALL PUTTY

I can cause began install another piece of useful software for windows

operating system called party It can be used to communicate directly to ESP

32 or ESP similar softwares Also, you can find for other operating systems.Let's now insert party for windows Got a browser Go to party.org

Here you can click this portion So it will get started downloading I havealready downloaded so you can download and go to download for them tofind this application and download for them Buddy is already downloadedthat I click and click on install

Trang 37

pig run here You go next browse about, I keep it as a default click on next.

I short cut to a desktop so you can choose one of this I'm just gaping thisoption Install So what is successfully installed? Click on finish icon isalready created in the desktop We'll be using this application later

Trang 39

SOLVE PORT IS NOT DETECTED DEVICE DRIVERS

If the body is not detected in your busy, when you're collecting ESP 32 orESP two double six, we have the install communication driver IC majorly ofthe development board user CP 2 1 0 X or CS 3 4 0 tips 32 It comes with the

CP 2 1 0 And ESPN two w six Lauren bought it comes with CST four zerocheck we'll be installing CS 3, 4, 0 first going to device manager, devicemanager, manager I have two board here This one is ESP eight, two and six.This is ESP 32, which users 3, 4, 0 chip And this is a CP 2, 1 0 chip So let

me connect C uh, ESP, uh, two double six

The waste manager is reloader You can see it is detected something likeUSB 2.0 CDL, but the driver is not installed so fast We have installed the Then we'll be coming back to CP 2, 1 0 already installed CP 2, 1 0, and I'mreconnecting and checking it

Trang 40

If I can enter the ESP 32, you can see there is something called a port comes.

If I take boards, you can see the column six is I located to ESP 32 And whichusers CP 2, 1 0 communication tip from silicone labs So one, I didn't insertthis one I already insert, but we'll be checking how to install both In yourbusy So if I say I'm connecting back to ESP, we'll be installing the devicediver for this one ARPANET browser You have research CSD for zero

driver wcs.com Click on this website that is ww.ca wcs.cn To download thedriver Click here now website is loaded

Ngày đăng: 23/01/2022, 18:02

TỪ KHÓA LIÊN QUAN