![]() ![]() HTML is the core building block of the webpage. Who wants a boring website!? Javascript is used in any of the event handling (pushing a button, etc.). CSS is used in generating the style of the webpage. The Python is used in the flask server and in the RxTx.py file, which handles the code transmission and receipt. The languages that are involved here are: If this happens to you, please leave a comment! I try to comment as much as possible, but I likely left gaps that may require explanation if any of you spend time trying to understand it. This is the part on which I spent most of my time when I was developing this project. ![]() The range is more than sufficient (50+ft). Note: Again, you may connect an antenna to the transmitter as needed, but I found I did not need to. This little chip was surprisingly sensitive and faithfully detects signals out to at least 50ft from where it was sitting and through at least two walls. Note: You may connected an antenna as needed, but I found I didn't need to. If you decide to choose different pin numbers than the ones I indicate below, have no fear! When you download the source code, simply modify the pin numbers as needed in the RxTx.py file. You may have a different configuration if you purchased different transmitter/receiver hardware than I indicated in the introduction. The following are the connections I made. To do so, open the terminal on your Pi and type pinout. You will want to religiously reference the pinout diagram of the GPIO pins. You will be connecting the pins of the transmitter and the receiver to the GPIO pins of your Pi. Instructions for modifying settings can be found here.Īt this point, it is time to make all of the physical connections you will need to do in preparation for setting up the source code for this project. There are also settings you will need to adjust on your Pi. For the GUI option, you will want to install VNC Viewer onto the computer you plan to be working on. PuTTY will work, but I prefer to have a GUI (graphical user interface), which makes it seem like you're directly on the Pi. If you too prefer this option, you need to install some sort of environment to SSH into the Pi. I prefer to develop on my Raspberry Pi from the comfort of my desktop computer. In the event you don't have pip installed on your Pi, you will need to type sudo apt-get install python3-pip. From the Pi command line, type sudo pip3 install flask. Flask allows us to create our web server. Once you have confirmed this, you need to install flask onto your Pi. Exit the terminal by closing out or typing exit(). If you have Python 3, you should see the python terminal open. ![]() To do this, type python3 into the command line. If you plan to use an existing Pi (which you can totally do), all you need to is to make sure you have Python 3 on your Pi, since that is what all of the source code I provide is written in. Start off by installing the latest version of Raspbian on your new Raspberry Pi. This is a project I've dreamed of completing for years, and although there is still room for additions, the project described as follows is a functional system. A web front-end to this project is ideal since any web-connected device on your network can be used as your remote. The outlets come with remotes that can turn on/off outlets, but that's no fun! We will instead use a web server running on the raspberry pi that allows anyone connected to the network to turn on or off certain outlets. This project uses radio frequency controlled outlets at 433MHz coupled with an RF transmitter connected to your raspberry pi. There's quite a bit going on in this, so if you have questions on any step, please leave a comment so I can update the Instructable with the needed details. For all of you code monkeys out there, feel free to dig around in the code, and scrutinize me in the comments! I'm always looking to improve. I will work to keep this as high level as possible and provide code to make this all work. I chose to write this project when I saw the Sensors contest, and since this project involves using a sensor to read codes off of the remote provided with the outlets you purchase, I thought this project would be the perfect fit. In this Instructable, I will demonstrate to you how to create a web interface to control outlets in your home using a Raspberry Pi. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |