Hardware Reference
In-Depth Information
root = Tk()
app = Application(master=root)
app.mainloop()
Note
The complete code is available on the GitHub repository of the project at the following
web page:
https://github.com/openhomeautomation/arduino-home-automation/tree/master/chapter3
You are now ready to test the project. Make sure that the Arduino sketch we developed
earlier is loaded onto the board, that the board is powered (via USB or an external power
source), and that the Bluetooth module is paired with your computer. You can now simply
go to a terminal window, go to the folder where the Python file is located, and type the
following:
python interface.py
This should open the interface and immediately make some measurements from the Ardu-
ino board. The following is what you should see on your screen, depending on your oper-
ating system:
If you can't see the interface at this point, there are several things you can check. First,
make sure the Arduino sketch is working just as we tested it in the previous section. Also,
make sure that your Python installation is working correctly and that the Python sketch
does not produce errors. If you can see some errors that are being displayed inside your
Search WWH ::




Custom Search