sudo apt-get update
Enable interfaces
sudo raspi-config
Enable Interface options VNC, I2C, SPI, Serial, etc.
(Optional) Install Remote Desktop
apt-get install xrdp
We also want to install some CircuitPython Adafruit libraries, since we're gonna use a lot of sensors from Adafruit, because they make their own drivers for them. Follow the instructions here: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi
Download the Arduino IDE, go to preferences and add the URL below for Additional Boards Manager (click on the small icon on the side):
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Click OK.
Now, go to the 'Tools' tab, mouse over 'Board:' and go to 'Boards Manager...' and install the following:
"Arduino SAMD Boards"
"Arduino SAMD Beta Boards"
"Adafruit SAMD Boards"
Restart the Arduino IDE.
Now connect the Adafruit Feather M0 with USB and go to the 'Tools' tab, go to 'Board:' and pick 'Adafruit Feather M0'.
And that's it!
| GPS | Raspberry Pi |
|---|---|
| Vin | 3.3V |
| GND | GND |
| RX | UART TX |
| TX | UART RX |
sudo apt-get install minicom
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles
(single line)
sudo minicom -s
Go to serial port, change serial device to: /dev/ttyS0 Go to Bps/Par/Bits, change baudrate to: 9600
| Sensor | Raspberry Pi |
|---|---|
| Vin | 3.3V |
| GND | GND |
| SCL | i2c SCL |
| SDA | i2c SDA |
First we gotta set-up the Raspberry Pi:
sudo apt-get install python-smbus
sudo apt-get install i2c-tools
Set up modules:
sudo nano /etc/modules
i2c-bcm2708
i2c-dev
Remove blacklists:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
#blacklist spi-bcm2708
#blacklist i2c-bcm2708
The MPL3115A2 requires a repeated start command in it's I2C communication - the Raspberry Pi doesn't do this out of the box, but we can use a kernel module.
sudo su -
echo -n 1 > /sys/module/i2c_bcm2708/parameters/combined
exit
We will also use Adafruit's CircuitPython MPL3115A2 library, and once the Adafruit CircuitPython dependencies are installed above, we can install the sensor driver with:
pip3 install adafruit-circuitpython-mpl3115a2
Additional Reading: