-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
54 lines (44 loc) · 2 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
******************************************************************************************
Petbuddy v0 Demo units
******************************************************************************************
Materials:
1. raspi
- webapp repo must be cloned on to this
- network needed, wifi or ethernet or ethernet over usb
- 1 usb port for the camera needed (so for pi zero a usb hub is needed)
2. network
3. servo - Futaba S3003 Standard Servo or similar
4. dollar store plastic jar with screw on lid
5. cheapo ebay usb webcam
******************************************************************************************
Webapp:
1. git clone the repo
2. from outside the repo directory do:
$ virtualenv petbuddy-v0-demo/
$ cd petbuddy-v0-demo
$ . bin/activate
$ pip install Flask
4. Need to install RPi.GPIO library
- First need python-dev, without it the library will not build properly:
$ sudo apt-get install python-dev
$ pip install RPi.GPIO
******************************************************************************************
Video stream using Raspi cam:
Some people have made a open source project for this.
- Documentation: http://elinux.org/RPi-Cam-Web-Interface
- github: https://github.com/silvanmelchior/RPi_Cam_Web_Interface
You can run this server in the background and tie it into the petbuddy system.
******************************************************************************************
Gotchas:
If you get an error when running the app that looks like this:
socket.error: [Errno 98] Address already in use
then change the port in this line:
app.run(host='0.0.0.0', port=8070, debug=True)
to something that might not be in use.
******************************************************************************************
Raspi setup:
On pi zero, the usb wifi dongle gets the wlan0 interface renamed by the kernel driver.
To fix this, just do:
$ dmesg | grep -i renamed
And then change all mentions of wlan0 in /etc/interfaces file to whatever the wlan0 was
renamed to.