-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRaspberryPiInstall.txt
More file actions
98 lines (73 loc) · 4.58 KB
/
RaspberryPiInstall.txt
File metadata and controls
98 lines (73 loc) · 4.58 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
97
98
Raspberry Pi Installation Guide
=================================
=================================
This can be slightly different depending on which Raspberry Pi (2 or 3). Differences should be noted.
Setup of Raspberry Pi
=====================
-Install Basic Raspian via NOOBS (follow any online tutorial -- I am using NOOBS v1.4.1)
-While it is installing, select Language = English (US) and Keyboard = (us)
-Default login is (pi), password is (raspberry)
-Notes:
-To start the Raspberry Pi desktop, type $ startx
-From the desktop, there is a wifi utility
- '$ [command]' will be terminal commands in this document
-Enter Raspberry Pi Config -- This often pops up when you first boot the RaspPi after installing the operating system.
$ sudo raspi-config
-Select '8. Advanced Options' and change:
-A1 Overscan = Disable
-A4 SSH = Enable
-A7 I2C = Enable
-A8 Serial = Disable
-Select Finish, reboot.
-Setup Internet on the Raspberry Pi. (follow any online tutorial)
-I used Wifi TP-Link WN722N, however there is a whole list of adapters recommended for the Raspberry Pi.
-Ethernet should work fine.
-Update the Raspberry Pi Software
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install git
Installation of Github Repository
====================================
-Clone the repository
$ git clone https:/github.com/creare-com/aerowake
-This will probably require an authorized account.
Serial Communication using GPIO pins
====================================
-Run serial_enable_rasppi.sh in the aerowake repository
$ sudo ./serial_enable_rasppi.sh
-The following can be used to change the baudrate, but are not necessary.
for RaspPi 3:
$ sudo stty -F /dev/ttyS0 115200
for RaspPi 2:
$ sudo stty -F /dev/ttyAMA0 115200
Installation of Dronekit and Mavproxy
=====================================
-Install packages
$ sudo apt-get install screen python-wxgtk2.8 python-matplotlib python-opencv python-pip python-numpy python-dev python-serial python-pyparsing
$ sudo pip install pymavlink
$ sudo pip install mavproxy
$ sudo ppip install dronekit
Testing of Pixhawk Connections
=====================================
-Use Mavproxy to ensure the pixhawk connections work. Start with the GCS pixhawk. Plug the Pixhawk Telemetry Radio into the Raspberry Pi. Set up the telemetry radios using a normal computer with Mission Planner, and confirm they work.
-Power the GCS Pixhawk on.
-Enter the following command
$ mavproxy.py --master=/dev/ttyUSB0 --baudrate 57600
-You should see it initialize and say the firmware version**
-When mavproxy is running, there are a list of commands that you can enter -- view all by typing help
-For this document, Mavproxy commands will be shown as MAV> [command], however MAV will be the flight mode the vehicle is in, such as AUTO or MANUAL or ALTHOLD.
-If the pixhawk does not connect, there is an issue with the telemetry radio system. Most likely the issue is with the telemetry radios not being on the same channel.
-Ctrl-C to exit Mavproxy.
-Next attempt to connect to the UAV pixhawk.
-Ensure that the raspberry pi's GPIO pins are connected to the pixhawk's telemetry 1 port, and that the pixhawk is configured to use 115200 baud on that telemetry port. This is parameter SERIAL1_BAUD, and will have to be set using Mission Planner on a normal computer.
-For the Raspberry Pi 2:
$ mavproxy.py --master=/dev/ttyAMA0 --baudrate 115200
-For the Raspberry Pi 3:
$ mavproxy.py --master=/dev/ttyS0 --baudrate 115200
-If mavproxy cannot connect, it is most likely an issue with the Raspberry Pi's serial port on the GPIO. This can have to do with incorrect baud rates, the user not being on the dialout group, or the raspberry pi configuring the serial port for another function upon startup. The serial_enable_rasppi.sh script will hopefully fix these problems, but the Raspbery Pi 3 is known to be problematic with the serial port on the GPIO.
Wiring Instructions
===================
-The Raspberry Pi 2 needs 5 volts @ up to 1A. Realistic current draw is ~.5A, but USB devices will draw more, so a large safety margin is good.
-I used 3 7805 5v Linear regulators in parallel (they got hot during operation)
-Would recommend a high-power, high quality switching regulator such as this: http://www.amazon.com/Castle-Creations-Bec-Switching-Regulator/dp/B000MXAR12
-This should be fed from a 12volt power source (3 cell LiPo) onboard the UAV. This battery hot-swappable, as we dont want to keep shutting down the raspberry pi.