From 27d3aad918190dfbb3eca5845c8bedb3e0225d22 Mon Sep 17 00:00:00 2001 From: shrkey Date: Thu, 6 Oct 2016 23:43:57 +0100 Subject: [PATCH] config --- 640.md | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/640.md b/640.md index c466e56..220b0e2 100644 --- a/640.md +++ b/640.md @@ -33,11 +33,51 @@ Welcome to the 640 board - this guide will describe all the features of the 640 ### Attaching a motor ### Attaching an RC receiver -# Setting up your Pi +## Setting up your Pi -## Enable I2C +Before we can start using the 640 board we need to enable the interfaces that the board uses on your Raspberry Pi. -## Enable SPI +The 640 board is controlled using the I2C interface. Any expansion boards attached to your 640 board are controlled using the SPI interface. + +### Enable I2C and SPI in Pixel + +If you are using the graphical interface on your Raspberry Pi then click on your main menu icon, move down to *Preferences* and click on the *Raspberry Pi Configuration* menu item. Once open click on the *Interfaces* tab and you should see something like in the image below. + +![rasbpi config i2c](/images/raspberryi2c.png) + +Make sure that the line labelled I2C is set to enabled. + +If you have an expansion board then you'll need to enable the SPI interface as well on the line above, so click the *Enabled* setting next to the *SPI* label + +![rasbpi config spi](/images/raspberryspi.png) + +Once you click Ok you may be promtped to reboot your Raspberry Pi - go ahead and reboot. + +### Enable I2C and SPI on the command line + +If you are only using the command line on your Raspberry Pi then you will need to use the text version of the Raspberry Pi configuration tool to enable the interfaces. + +Type the following to bring up the configuration interface: + +``` bash +$ sudo raspi-config +``` + +Once the menu is showing, scroll down to the *Advanced Options* menu and press Enter. + +![rasbpi config adv](/images/advoptions-450.PNG) + +Now we'll need to enable the I2C interface, so move down *I2C* menu and press Enter. You'll be asked if you want to enabled I2C - select *Yes* and you will see a confirmation and be returned to the main menu. + +![rasbpi config adv i2c](/images/i2c-450.PNG) + +Go to the *Advanced Options* again and do the same for *SPI* + +![rasbpi config adv spi](/images/spi-450.PNG) + +This time when you are returned to the main menu, move down to the *Finish* option (pressing the right arrow key twice will get you there) and press enter. + +You have now enabled the interfaces you need to use your board. # Programming the 640