forked from zhaozhichen/rpi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheatsheet.txt
More file actions
96 lines (81 loc) · 3.15 KB
/
cheatsheet.txt
File metadata and controls
96 lines (81 loc) · 3.15 KB
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
Setup new RPI:
sudo apt-get update
sudo apt-get upgrade
#sudo apt-get dist-upgrade
#sudo rpi-update # don't update firmware yet! wifi/bluetooth adaptor driver not ready with new firmware yet
install driver for wifi / bluetooth adaptor:
https://edimax.freshdesk.com/support/solutions/articles/14000047172-how-to-install-ew-7611ulb-adapter-on-raspberry-pi
# deal with new firmware:
http://raspberrypi.stackexchange.com/questions/50240/missing-build-file-when-building-for-rtl8812au-driver
install driver for camera:
http://www.geeetech.com/wiki/index.php/Raspberry_Pi_Camera_Module
Note: libjpeg62-dev is no longer in the package. use libjpeg62-turbo-dev instead
How to install v4l-utils: https://github.com/gjasny/v4l-utils
make -f tensorflow/contrib/pi_examples/camera/Makefile
sudo apt-get install flite
tensorflow/contrib/pi_examples/camera/gen/bin/camera | xargs -n1 flite -t
raspivid -o test.h264 -t 10000
sudo apt-get install gpac
MP4Box -add test.h264 test.mp4
raspistill 2>&1 | less
ls *.jpg > stills.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@stills.txt
omxplayer 2016-12-25.mp4
log to b@B remember password, at client: cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
df -h
du -h
arduino in command line: platformio
http://blog.cudmore.io/post/2016/02/13/Programming-an-arduino-with-platformio/
compile platformio: pio run
upload to arduino: pio run --target upload
tight vnc:
on rpi, run: tightvncserver
on mac, Finder -> Go -> Connect to Server: vnc://raspberrypi.local:5901
about serial port on rpi:
http://www.hobbytronics.co.uk/raspberry-pi-serial-port
in /etc/inittab, comment out:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
platformio third party lib:
http://platformio.org/lib/show/937/Infrared/examples
IR lib:
http://platformio.org/lib/show/937/Infrared/examples
lib url: https://github.com/bengtmartensson/Infrared4Arduino
initialize platform:
pio init -b uno
compile: pio run
upload: pio run --target upload
Another command line tool for Arduino:
http://inotool.org/quickstart
ino build -cppflags="-std=c++0x"
live stream
https://blog.miguelgrinberg.com/post/stream-video-from-the-raspberry-pi-camera-to-web-browsers-even-on-ios-and-android
manually install imagemagic: https://www.imagemagick.org/script/install-source.php
# install mencoder:
wget http://www.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2
tar xavf mplayer-export-snapshot.tar.bz2
cd mplayer-export-2016-03-26/
<need to install ffmpeg>
./configure
< ... wait a long time here ...>
sudo make install
# install MP4Box:
sudo apt-get install gpac
which MP4Box
#send mail
sudo apt-get install ssmtp
#add following to /etc/ssmtp/ssmtp.conf:
mailhub=smtp.gmail.com:587
hostname=raspberrypi
FromLineOverride=YES
AuthPass=mypass
UseSTARTTLS=YES
#add following to /etc/ssmtp/
root:[email protected]:mail.google.com:587
#add following to /etc/rc.local:
ifconfig | mail -s "raspi inconfig" [email protected]
#dropbox uploader
https://github.com/andreafabrizi/Dropbox-Uploader
#email ifconfig on startup
@reboot /bin/sleep 60; /home/pi/rpi/sendIP.sh 2>&1