-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.txt
53 lines (41 loc) · 1.34 KB
/
info.txt
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
# GPIO Ports
Vcc was set to he 3.3 v.
Ground was set to 0 v.
Pin A: GPIO17, Pin# 11, GPIO_GEN0
Pin B: GPIO18, Pin# 12, GPIO_GEN1
# Hardware
2x NPN transistor 2N4401
1x small breadboard
2x 4 k ohm resistors
2x 56 k ohm resistors
# Setup
Setup NPN transitors with
# Current Test
Below is table of current measured with a ammeter. Units
are reported in mA.
Pin | GPIO Current | Total Current |
----|--------------|--------------|
Pin A | 0.54 | 5.95 |
Pin B | 0.51 | 5.11 |
----|--------------|--------------|
Both pins on high (3.3 V) gave a total current of 11.06 mA.
This is low current draw and is probably low enough for both the GPIO and LED safety.
I don't have a datasheet for the LEDs but they're probably safe below 20 mA.
Apparently the raspberry pi GPIO pins can handle 50 mA max, so we're safe with a
0.54 mA draw on the base of the transistor.
# Imports and Installs
sudo apt-get install python-rpi.gpio
pip3 install RPi.GPIO
pip3 install "picamera[array]"
tutorial on compiling opencv: https://www.pyimagesearch.com/2017/10/09/optimizing-opencv-on-the-raspberry-pi/
I used a bunch of tutorials, online documentation, etc. for developing the code.
# Setup
```bash
mv pitracker.sh /etc/init.d
cd /etc/init.d
chmod 0755 pitracker.sh
sudo chkconfig --add pitracker.sh
sudo systemctl daemon-reload
# Test it out!
sudo service pitracker.sh start
```