Skip to content

nibrasohin/Dimmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dimmer

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

Running the Client Script

There are 3 configurations for client script. This instructions assume the file is on desktop. To run script:

  1. Open terminal
  2. execute "cd Desktop", now we should be in Desktop where the client script resides.
  3. 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"

Different Configurations:

  1. "" (Default): this runs client with: lux sensor + no output on terminal + using PWM for Actual power (feedback)
  2. "nolux": this runs client without lux sensor (-1)
  3. "debug": this runs client that prints output. This could be used to see client is sending and getting sensible data from server.
  4. "digital": this runs client digial GPIO (7 bits) for Actual power (feedback)

Troubleshooting for client:

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.

Setup Raspberry PI from start to running client script:

  1. Install raspbian: https://www.raspberrypi.org/help/noobs-setup/2/
  2. Connect to internet and update the system (In terminal type: "sudo apt-get update")
  3. 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
  4. 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
  5. Copy the client.py file from GitHub to Desktop
  6. Run the client script

Connecting to UofM (EAP) internet

You will need to access PI somehow for the first time, probably using a monitor.

  1. In terminal type: "sudo nano /etc/wpa_supplicant/wpa_supplicant.conf"
  2. 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" }
  3. To save the file, press "Ctrl+X", y, enter to save the file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published