From the course: Introduction to MicroPython and Physical Computing
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Program the board
From the course: Introduction to MicroPython and Physical Computing
Program the board
- [Robert] Now we're ready to turn our physical prototype on the breadboard into an active web server. But first, a brief description of how a web server works. When the server code starts, it tries to join a network, in our case, a wifi network. If it's successful, it receives an IP address, which is a set of four numbers separated by periods. Once it's on the network, it waits for something like a web browser to contact it with a request. When it receives the request, the web server performs any actions, like retrieving sensor values in our case, then returns a webpage to the browser. The server goes back to listening and the process repeats. With that, let's go to the desktop and see if we can get our web server up and running. Okay, here we are in Thonny, and I'm connected to the Exercise files here and the prototype board is also connected. Let's take a quick look at these files. There's an HTML folder with a dashboard in it, which gets returned for every request. There's an…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.