Hosted at: https://dimmerbrightness.herokuapp.com/signal/
GPIO Output Pins (To dsp): [17, 27, 22, 23] Actual Power / Feedback:
- GPIO Input Pins: [6, 13, 19, 26, 16, 20, 21] or
- PWM Pin: 5
There are 3 configurations for client script. This instructions assume the file is on desktop. To run script:
- Open terminal
- execute "cd Desktop", now we should be in Desktop where the client script resides.
- Run the script "python client.py configurations" note: If there's an error running the client write this command:sudo pigpiod
To stop the client press: "Ctrl + C"
- "" (Default): this runs client with: lux sensor + no output on terminal + using PWM for Actual power (feedback)
- "nolux": this runs client without lux sensor (-1)
- "debug": this runs client that prints output. This could be used to see client is sending and getting sensible data from server.
- "digital": this runs client digial GPIO (7 bits) for Actual power (feedback)
If client is not working even after re-running script, use debug (configuration 3 or 4) and if there is only 1 ouput line and nothing more, it means client cannot connect to server. Possibly because server is down or PI isn't connected to net.
- Install raspbian: https://www.raspberrypi.org/help/noobs-setup/2/
- Connect to internet and update the system (In terminal type: "sudo apt-get update")
- Enable SSH , VNC and I2C in "Top Left Corner(raspberry)/Preferences/Raspberry Pi Configuration/Interfaces".
- SSH: for file transfer
- VNC: to manage client script
- I2C: for lux sensor
- Reboot and setup VNC server
- Create an account from VNC's webpage and sign-in with this account in PI
- Choose Direct and cloud connectivity while setting up: this lets you automatically access PI after start up
- Copy the client.py file from GitHub to Desktop
- Run the client script
You will need to access PI somehow for the first time, probably using a monitor.
- In terminal type: "sudo nano /etc/wpa_supplicant/wpa_supplicant.conf"
- A file would open up, go at the bottom and type:
network={ ssid="uofm-secure" key_mgmt=WPA-EAP eap=PEAP identity="your@myumanitoba.ca" password="yourPassword" phase2="auth=MSCHAPv2" }
- To save the file, press "Ctrl+X", y, enter to save the file.