The previous tutorial showed how to create a wifi access point but the ESP8266 didn't do anything once a station was connected. In this tutorial, we build upon the previous access point to serve a simple HTML web page in response to a request from a connected station.
The ESP8266 Webserver library implements a basic web server that allows the ESP to respond to incoming HTTP requests without needing to worry about the low level details of the response. Include the library at the top of the sketch with the line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Next we need to declare a new Web Server object using the HTTP port number, 80. This is the default port that a browser will use.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The ESP web server needs to be continually polled to see if anything is trying to connect to the device. This is done with a single call, placed inside the main loop code for the device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now we have set up a web server to respond to HTTP requests we need to tell it what to respond with. These last few lines create a function that replies to a root ("/") request with a simple text response "Hello World!". It is possible to add other URI responses to the webserver, to serve different pages depending on what is requested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Putting it all together gives us this sample code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compile the sample code and upload it to the device, you should be able to connect to the wifi network created by the ESP chip. The default IP address for the device is 192.168.4.1 so open a browser and navigate to "http://192.168.4.1/", a page should load showing this response
The RDC6442G controller from Ruida This is going to be quite an image heavy post describing the rewiring needed to convert between the Leetro controller and the Ruida controller. It is also pretty straight forward on the old Just Add Sharks laser cutters because all of the wires are clearly labelled. The controller was prepared in the previous step in order to make this conversion process as smooth as possible. The Leetro (Pad03) panel on the left and the Ruida panel on the right The view from inside the laser looking up at the control panel The control panel is an easy place to start, both panels have just a single cable that runs down to the controller, both panels are a very similar size, with the Ruida panel being slightly smaller underneath so it will fit in the hole left behind easily. The Pad03 panel clips into place so you'll need to reach up inside the machine to work the clips loose. The cable runs down the inside of the laser and is cable tied onto mounti...
This is my laser cut cryptex. It features 28 different characters and 9 rings, giving a total possible 10.5 Trillion different combinations. I took a bit of time developing the design so that I could add some nice features. This cryptex file is laid out so that you can have any number of rings in your own design. The best feature is that the codeword is changeable, each locking ring has an outer letter ring that can be placed in any one of the 28 different positions. Once the rings are back in place the ring locking bars can added and they prevent the rings from being modified until the box is open again. It's a bit hard to explain so I made a video showing how it all work ( svg here ) It took a long time to assemble this so I lived with my initial design choices but if I were to remake it I would adjust the file to make the ring locking bars out of 6mm ply and maybe put some blind holes onto the code rings to prevent the code being brute forced.
A while back I found myself on one of Dinkydoodle Designs cake course where I made a moving BB9 cake , it taught me a lot about the cake making process and I used a lot of that knowledge in making this new Toothless Dragon cake. The electronic parts are simply a servo, arduino, neopixels and a sound recorder, all fairly common parts but I learned a lot making/baking my own cake. A 9 inch round cake was baked , cut and modified to form the basic shape required. Two crescent shapes were cut and moved up to form horns, the two eye sockets were added to the cheeks to pad them out a bit. The cake was covered in chocolate ganache to smooth out the lumps and bumps and firm the design up. Larger dollops of ganache further filled the gaps between the horns and the head. Chocolate Silk sugarpaste was used to cover the whole cake. A large rolled sheet was stretched into place, smoothed and trimmed down to the board. Details were added using rolled...