Clone the repository to a directory
$~ git clone https://github.com/WPI-AIAA/GoatFinder
$~ git checkout dev
From here move into a specific branch
$~ git checkout <branch>
We will be working out of two primary branches within dev
groundStation
rover
ssh [email protected], password: see GroupMe
-
Open config.txt
sudo nano /boot/config.txt
-
Add the following line to the file
dtoverlay=pi3-disable-bt
-
Reboot
sudo reboot
Taken from Adafruit
-
Install I2C tools
sudo apt install -y python-smbus
sudo apt install -y i2c-tools
-
Install Kernel Support
sudo raspi-config
-
Navigate to Interfacing Options and Enable I2C
-
Reboot
sudo reboot
-
Check for attached I2C devices
sudo i2cdetect -y 1
Taken from Adafruit
-
Remove the blacklist for the SPI module
sudo nano /etc/modprobe.d/rapsi-blacklist.conf
-
Reboot
sudo reboot
-
Check the devices are available
ls -l /dev/spidev*
- Install Serial Library
sudo apt install python-serial
Taken from Django
-
Install Python
sudo apt install python3
-
Setup a Database (optional)
place holder
-
Install PIP
place holder
-
Install Django
place holder
We will be using the BCM GPIO numbering
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
I2C will be used to interface with the BMP280 and LSM9DS0
import smbus
myDevice = smbus.SMBus(1) # The Pi has two available busses, 0 and 1
myAddress = 0x00 # Device address
def read(byte):
return(myDevice.read_byte_data(myAddress, byte)) # Read a Byte
def write(byte, value):
myDevice.write_byte_data(myAddress, byte, value) # Set a Byte to Value
UART will be used to interface with the XBEE Radio or GPS
import serial
port = serial.Serial("/dev/ttyAMA0", baudrate=115200, timeout=3.0) # ttyAMA0 corresponds to the UART interface
port.write("Sometext")
port.read(10) # Read 10 Characters
XBEE Radio Protocol Options
- Ad Hoc Wireless Network Mode
- Serial Communication Service
- API Mode