-updating instructions with virtualenv

pull/1/head
jbruce 2018-11-27 11:18:40 -05:00
rodzic 6bce47931e
commit 5266523cf7
2 zmienionych plików z 27 dodań i 50 usunięć

Wyświetl plik

@ -23,54 +23,39 @@ Turns a Raspberry Pi into a cheap, web-enabled kiln controller.
## Hardware
* Raspberry Pi (Rev 2B)
* Raspberry Pi
* MAX 31855/6675 Cold-Junction K-Type Thermocouple
* GPIO driven Solid-State-Relays/MOSFETs
* GPIO driven Solid-State-Relay
## Installation
### Dependencies
Download NOOBs and install raspian
We've tried to keep external dependencies to a minimum to make it easily
deployable on any flavor of open-source operating system. If you deploy it
successfully on any other OS, please update this:
### Raspbian
#### Currently tested versions
Download NOOBs. Copy files to an SD card. Install raspian on RPi using NOOBs.
* greenlet-0.4.2
* bottle-0.12.4
* gevent-1.0
* gevent-websocket-0.9.3
#### Ubuntu/Raspbian
$ sudo apt-get install python-pip python-dev libevent-dev
$ sudo pip install ez-setup
$ sudo pip install greenlet bottle gevent gevent-websocket
#### Gentoo
$ emerge -av dev-libs/libevent dev-python/pip
$ pip install ez-setup
$ sudo apt-get install python-pip python-dev libevent-dev python-virtualenv
$ git clone https://github.com/jbruce12000/kiln-controller.git
$ cd kiln-controller
$ virtualenv venv
$ source venv/bin/activate
$ pip install greenlet bottle gevent gevent-websocket
#### Raspberry PI deployment
Note: the above steps work on ubuntu if you prefer
### Raspberry PI deployment
If you want to deploy the code on a PI for production:
$ cd kiln-controller
$ virtualenv venv
$ source venv/bin/activate
$ pip install RPi.GPIO
This **only applies to non-Raspbian installations**, since Raspbian ships
RPi.GPIO with the default installation.
If you also want to use the in-kernel SPI drivers with a MAX31855 sensor:
$ sudo pip install Adafruit-MAX31855
### Clone repo
$ git clone https://github.com/apollo-ng/picoReflow.git
$ cd picoReflow
$ pip install Adafruit-MAX31855
## Configuration
@ -82,14 +67,12 @@ All parameters are defined in config.py, just copy the example and review/change
### Server Startup
$ ./picoReflowd.py
$ ./kiln-controller.py
### Autostart Server onBoot
If you want the server to autostart on boot, run the following commands
sudo cp /home/pi/kiln-controller/lib/init/kiln-controller /etc/init.d/
sudo chmod +x /etc/init.d/kiln-controller
sudo update-rc.d kiln-controller defaults
$ /home/pi/kiln-controller/start-on-boot
### Client Access

Wyświetl plik

@ -13,8 +13,8 @@ listening_ip = "0.0.0.0"
listening_port = 8081
### Cost Estimate
kwh_rate = 0.26 # Rate in currency_type to calculate cost to run job
currency_type = "EUR" # Currency Symbol to show when calculating cost to run job
kwh_rate = 0.18 # Rate in currency_type to calculate cost to run job
currency_type = "$" # Currency Symbol to show when calculating cost to run job
########################################################################
#
@ -27,14 +27,8 @@ currency_type = "EUR" # Currency Symbol to show when calculating cost to run
### Outputs
gpio_heat = 11 # Switches zero-cross solid-state-relay
gpio_cool = 10 # Regulates PWM for 12V DC Blower
gpio_air = 9 # Switches 0-phase det. solid-state-relay
heater_invert = 0 # switches the polarity of the heater control
### Inputs
gpio_door = 18
### Thermocouple Adapter selection:
# max31855 - bitbang SPI interface
# max31855spi - kernel SPI interface
@ -52,7 +46,7 @@ gpio_sensor_data = 17
spi_sensor_chip_id = 0
### amount of time, in seconds, to wait between reads of the thermocouple
sensor_time_wait = .5
sensor_time_wait = 2
########################################################################
@ -70,8 +64,8 @@ pid_kp = 0.5 # Proportional
sim_t_env = 25.0 # deg C
sim_c_heat = 100.0 # J/K heat capacity of heat element
sim_c_oven = 2000.0 # J/K heat capacity of oven
sim_p_heat = 3500.0 # W heating power of oven
sim_c_oven = 5000.0 # J/K heat capacity of oven
sim_p_heat = 9450.0 # W heating power of oven
sim_R_o_nocool = 1.0 # K/W thermal resistance oven -> environment
sim_R_o_cool = 0.05 # K/W " with cooling
sim_R_ho_noair = 0.1 # K/W thermal resistance heat element -> oven
@ -82,7 +76,7 @@ sim_R_ho_air = 0.05 # K/W " with internal air circulation
#
# Time and Temperature parameters
temp_scale = "c" # c = Celsius | f = Fahrenheit - Unit to display
time_scale_slope = "s" # s = Seconds | m = Minutes | h = Hours - Slope displayed in temp_scale per time_scale_slope
time_scale_profile = "s" # s = Seconds | m = Minutes | h = Hours - Enter and view target time in time_scale_profile
temp_scale = "f" # c = Celsius | f = Fahrenheit - Unit to display
time_scale_slope = "h" # s = Seconds | m = Minutes | h = Hours - Slope displayed in temp_scale per time_scale_slope
time_scale_profile = "m" # s = Seconds | m = Minutes | h = Hours - Enter and view target time in time_scale_profile