2015-12-27 07:12:51 +01:00
|
|
|
# Tfm Controller - little thingy that reads sensors, runs motors and communicates with the cloud
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
|
|
1. Go to every subdirectory in drivers directory and follow instructions about installation of drivers
|
2016-06-08 10:34:05 +02:00
|
|
|
2. edit controller/config/__init__.py and set your controller ID to unique number
|
2016-01-24 09:57:03 +01:00
|
|
|
3. configure cron to run controller.py every 15 minutes as a superuser:
|
2015-12-27 07:36:20 +01:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
crontab -e -u root
|
2016-01-24 09:50:49 +01:00
|
|
|
#enter these lines
|
2016-06-08 13:18:08 +02:00
|
|
|
*/5 * * * * cd /home/pi/projects/tfm/controller && sh activity.sh
|
2016-06-08 10:45:32 +02:00
|
|
|
*/30 * * * * /usr/bin/python /home/pi/projects/tfm/controller/network_check.py
|
2015-12-27 07:36:20 +01:00
|
|
|
```
|
2016-06-08 10:34:05 +02:00
|
|
|
|
|
|
|
|
4. add following lines at the end of /etc/rc.local
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
python /home/pi/projects/tfm/controller/lockdown.py
|
|
|
|
|
python /home/pi/projects/tfm/controller/dweet.py
|
|
|
|
|
```
|