Step 7: Starting up the Public Window
Plug in your Arduino system.
Verify if Python is running. To do that, go to website folder locally and go to "Proxy"-folder and start up "main.py" (open "main.py" and hit tihe "f5"button. This will start up the Python websocket server.
Troubleshooting the COM port
There is a possibility that the file won't start or give an error. The most likely error will be that the COM port is not set right. To solve this problem you'll need to open the "wsthread.py" file ( located in the same folder as main.py). You'll need to open it with IDLE (right click-> open with IDLE). IDLE is installed with the python install.
You'll see this part of code:
def __init__ ( self, channel, details, websocket ):
self.channel = channel
self.details = details
self.websocket = websocket
self.arduino = ArduinoGateway("COM6")
self.poke_count = 0
self.last_val = ""
threading.Thread.__init__ ( self )
You'll need to change the ArduinoGateway corresponding with the right COM port that your Arduino uses on your computer. You can check this by going to you window control panel->system->hardware->device manager -> Ports(com & ltp). There you can see which ports are available at your computer. Normally, the Arduino will use the latest and highest COM port. (probably COM5 or COM6 ). Change if so required, save and close the file and restart "main.py".
Launching and Flash settings
After you have the Python part up-and-running, start the website. Double click on "index.html" to launch it. What you'll notice is that both the webcam streams won't work. This is because we need to set the security settings right for Adobe Flash.
• Right-Click on the webcam stream and go to settings.
• Enable the hardware acceleration
• Allow and remember the privacy regarding the Mic and Webcam
• After you'll get a pop-up of Flash regarding : Adobe Flash Player Security
• Click on settings
• Go to advanced
• Go to properties/options for trusted location
• Click on add
• Add the entire folder where your "index.html" file is located.
• Confirm it
• Refresh the webpage
You are now ready to go, you're the proud owner of a Public Window. Let's promote it.