forked from shaunuk/picar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme
124 lines (92 loc) · 2.87 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
NOTES
-----
1. use piblaster to do the soft pwm.
pcb pin 12 throttle 17
pcb pin 13 steer 18
pcb pin 2 powers steering servo
pis powered via usb cable powered by the esc black and red are 0v & 5v
2. download the piblaster daemon and js lib
mkdir ~/picar
cd ~/picar
git clone https://github.com/sarfata/pi-blaster.js
npm install pi-blaster.js
git clone https://github.com/sarfata/pi-blaster
make
sudo make install
(now runs automatically)
sudo make uninstall
(to uninstall)
3. iphone 5 servo throttle:
spd R --- M --- F
PWM DEMAND .105 .14 .175
GAMMA RAW -56 0
Use excel to scale gamma->demand
pwm = -.00125 gam + .175
. servo steer
steer L --- --- R
PWM DEMAND .105 .175
BETA RAW -30 30
pwm = .001167 x gam + .14
4. sony xperia settings
gamma:
fwd back
ph 7 -60
pwm .175 .105
=.001044 ph + .168
bets:
left r
-30 30
.105 .175
=.001167 ph + .14
use excel to scale beta->demand
6. Voltage range .17
7. pi current .46 A with a wifi fitted
8. BEC Max I 1A
9. Scaling the pwm and servos
a. use meter to get voltages from servos using rc controller
b. use pwm_test2 to get corresponding pwm demands for api
c. get raw gamma and beta vals from phone
d. scale in excel the gamma to pwm api levels
e gamma is throttle beta is steer
11. auto run node.js application on boot instructions
a. create node-server.sh in /etc/init.d
b. sudo chmod 755 ./node-server.sh
c. sudo update-rc.d node-server.sh defaults
d. "sudo update-rc.d node-server.sh remove" to remove auto start
e. "sudo /etc/init.d/node-server.sh start" to quick test or "stop"
f. sudo chmod +x ./node-server.sh
12. alias cmds
to put int /etc/init.d/rc.local
alias nodestart='sudo /etc/init.d/node-server.sh start'
alias nodestop='sudo /etc/init.d/node-server.sh stop'
alias nodetail='tail -n100 /var/log/node-server.log'
13. To check services
service --status--all
14. note pwm driver causes instability in the windowing environment
enter the following cmd if you aren't using the pwm daemon but
dont want the gui to hang
sudo /etc/init.d/pi-blaster stop
15. enter the following to set static ip
nano /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.43.251
netmask 255.255.255.0
gateway 192.168.1.254`
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
16. Check the node service can run from anywhere using
'sudo /etc/init.d node-server.sh start'
in different dirs other than picar.
17. change ownership of dirs sou you don't have to keep using sudo:
sudo chown -R pi media
sudo chown -R picar
ls -l picar
ls -l media
etc...
18. restart network...
sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start