Document 6546895

Transcription

Document 6546895
 RASPBERRY PI and TOPPING PI EXPERIMENT MANUAL www.inventrom.com Index Sr. No: Page No: 1) Hazards and Precautions 3 2) Warranty Policy 3 3) Disclaimer 3 4) Experiment 1: Studying ARM microcontroller on Raspberry Pi And accessing the Shell 4 5) Experiment 2: Using GPIOs of Raspberry Pi 12 6) Experiment 3: Interfacing motors to Raspberry Pi 15 7) Experiment 4: Interfacing Digital sensors to Raspberry Pi 18 8) Experiment 5: Interfacing Servo motors to Raspberry Pi 22 2 Copyright © 2014 Inventrom. All rights reserved Hazards and Precautions
1) Make sure you only use the power adapter provide by Inventrom for the ToppingPi. 2) Do not connect the battery to the ToppingPi in wrong direction. Make sure that the polarities are correct. Always make sure that the +ve point is connected to the + ve and –ve to the –ve of the board. Connecting the battery in opposite direction can burn the board and thus permanently damaging it. 3) Take precaution while connecting the FRC cable from ToppingPi to Raspberry Pi. Make sure notch on the FRC cable faces towards inner side of both boards. 4) Ensure that the devices are carefully handled. Warranty Policy
1) The warranty will be applicable only to manufacturing defects. 2) The warranty will be void in case of any physical damage to the devises or due to wrong usage or mishandling. 3) The warranty will be void if the board is damaged by connecting a wrong battery/power supply or if the battery is connected with wrong polarity. 4) Warranty will be void if Raspberry Pi is removed out of protective case. 5) Warranty will be void if Raspberry Pi GPIO Pins are accessed without the Topping Pi. Disclaimer
Neither Inventrom nor the supplier of these products shall be liable in case there is any direct or indirect damage caused during the use of the kits/products. 3 Copyright © 2014 Inventrom. All rights reserved EXPERIMENT 1
STUDYING ARM MICROCONTROLLER ON
RASPBERRY Pi AND ACCESSING THE SHELL
Aim: To study an ARM 11 architecture based Microprocessor using Raspberry Pi, accessing the shell and executing shell commands. Theory: What is a Raspberry Pi? The Raspberry Pi is a credit-­‐card-­‐sized single-­‐board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools. The Raspberry Pi is manufactured in two board configurations through licenced manufacturing deals with Newark element14 (Premier Farnell), RS Components and Egoman. These companies sell the Raspberry Pi online. Egoman produces a version for distribution solely in China and Taiwan, which can be distinguished from other Pi’s by their red coloring and lack of FCC/CE marks. The hardware is the same across all manufacturers. The Raspberry Pi has a Broadcom BCM2835 system on a chip (SoC), which includes an ARM1176JZF-­‐S 700 MHz processor, VideoCore IV GPU, and was originally shipped with 256 megabytes of RAM, later upgraded to 512 MB. It does not include a built-­‐in hard disk or solid-­‐state drive, but uses an SD card for booting and persistent storage. The Foundation provides Debian and Arch Linux ARM distributions for download. Tools are available for Python as the main programming language, with support for BBC BASIC (via the RISC OS image or the Brandy Basic clone for Linux), C, Java and Perl.
Figure 1 4 Copyright © 2014 Inventrom. All rights reserved Pi Ports Figure 2 Table 1
5 Copyright © 2014 Inventrom. All rights reserved Setting Up Your Pi
: Figure 3 Step 1: Insert a SD card with the Raspbian OS burnt onto it. You can download the OS from www.raspberryPi.org. You will need an SD card of Minimum 2 GB or more depending on OS requirements and other factors. Step 2A: You will need a HDMI to HDMI (HDMI to VGA or HDMI to DVI) cable depending on the connections suitable to the screen/monitor you want to interface with the Raspberry Pi. Step 2B: You’ll have to use the RCA port if your screen/monitor only supports RCA video IN. Step 3: To give Inputs to the Raspberry Pi you will require an USB mouse and an USB keyboard. Step 4: You can connect the Raspberry Pi to your local router /modem via the Ethernet port present on it. This will allow multiple user access to the Raspberry Pi. Step 5: Your Pi is now ready to be powered up. Simply plug is a 5v micro USB adapter/ phone charger to its power port and the system will boot up showing the booting sequence on the monitor you have attached to the Pi. 6 Copyright © 2014 Inventrom. All rights reserved Procedure: Accessing the Raspberry Pi (Shell / Command Line Access) Method 1: After following the steps above and once your system is powered up a couple of boot up messages, the system will ask you for a login name and password. Enter your LOGIN as “pi” (case sensitive) And PASSWORD as “raspberry” (know that you will not be able to view the letters being typed, it just registers keystrokes) Once you get the following screen your system will now execute shell commands typed in the screen Figure 4 Figure 5 Method 2: Step 1:If you followed Step 4( of Setting Up Your Pi) and connected Pi to the router/modem via LAN cable, then connect LAN cable from the different port of your router/modem to your pc or if your router/modem has Wi-­‐Fi then just connect your laptop via Wi-­‐Fi. If your Pi is properly connected to the router/modem all Led lights below the PWR Light of the Pi should light up. Refer figure 4. 7 Copyright © 2014 Inventrom. All rights reserved Also your pc should show LAN/Wi-­‐Fi access to your router/modem. Thus we have created a local network involving your laptop and your Pi. Step 2: To find your Pi's IP address on this local network. Open the software on your PC called Advanced IP Scanner. When the software starts correctly the following window (figure 6) should pop-­‐up on your screen. Figure 6 Step 3: Click button encircled above within the software called IP. If your system has got a valid IP the address bar will now contain a range of address within which the router assigns IPs. In the image above it is (192.168.1.1 -­‐ 192.168.1.255). This simply says that the router generally has its own IP address at 192.168.1.1 the first available address and your system or any other device connected to the same router will have an IP address of 192.168.1.x where x= any number between 2 and 255. Step 4: Click on SCAN, to search for all available systems present on the local network you just set up. The software will list out all systems along with their IP addresses when this is done. 8 Copyright © 2014 Inventrom. All rights reserved Figure 7 This IP address may vary for you and so may the name, but the manufacturer will always show as Raspberry Pi Foundation. (figure 7) Step 5: Note down this IP which your Pi has got from the router and then open a software named PuTTY which should be installed on your PC. Enter the same IP in the place encircle in the image shown below. (figure 8) Figure 8 9 Copyright © 2014 Inventrom. All rights reserved After clicking on open (no other setting required to be changed in PuTTY) typing in your login name and password (same as in Method 1) you will see the following screen. (figure 9) Figure 9 Once you get the following screen your system will now execute shell commands typed in the screen. Shell Commands
Type in the following commands and note their usage. Please note the “$” sign only denotes a shell command and need not be typed. Commands: $date $startx $Ctrl + C $hostname –l $ls $free $sudo mkdir myfolder $cd myfolder $sudo nano myfile 10 Copyright © 2014 Inventrom. All rights reserved Usage: date-­‐ displays current date and time (will not be accurate as the Pi does not have an onboard CMOS battery) startx-­‐ displays desktop type Linux GUI interface (will not work through PuTTY will only work with Method 1) Ctrl + C-­‐ pressing Ctrl + C will break any script running in shell hostname –l-­‐ shows your Pi’s IP address free-­‐ Shows how much memory space is available. ls-­‐ Shows list of files in the directory. Directory is same as folder in windows. sudo mkdir myfolder-­‐ sudo is used to give user administrator privileges and using this the user can make new files or folder, edit them and delete them when required. Mkdir is the command to make new folder/directory .myfolder will be the name of the new folder created and user can name it as per their liking cd myfolder-­‐ cd stands for change directory and cd followed by directory name will take you inside the directory. sudo nano filename-­‐ creates a new file with the name “filename” and opens it to be written into or edited using the nano software which is the notepad (text editor software for windows) version for Linux based system. Conclusion-­‐: The Raspberry Pi was accessed and basic Linux shell commands were studied using it. 11 Copyright © 2014 Inventrom. All rights reserved EXPERIMENT 2
USING GPIOs OF RASPBERRY Pi AND
INTERFACING AN LED
Aim: To study General Purpose Input Output (GPIO) Pins using Raspberry Pi and blink an LED. Theory: One of the great things about the Raspberry Pi is that it has a GPIO connector to which you can attach external hardware. GPIO voltage levels are 3.3 V and are not 5 V tolerant. There is no over-­‐voltage protection on the board -­‐ the intention is that people interested in serious interfacing will use an external board with buffers, level conversion and analog I/O rather than soldering directly onto the main board. All the GPIO Pins can be reconfigured to provide alternate functions, SPI, PWM, I²C and so. At reset only Pins GPIO 14 & 15 are assigned to the alternate function UART, these two can be switched back to GPIO to provide a total of 17 GPIO Pins. Refer to Annex 1 for the Pin names and alternate functions. Refer to Annex 2 for interfacing Raspberry Pi with ToppingPi. Procedure: Writing a new Python Programme Step 1: In shell command line type the following command $sudo nano ledblink.py This will open your nano editor and your file name will be ledblink.py. The “.py” is a required extension for the python interpreter to know that the file contains valid python script. Note: The LEDs on the ToppingPi Board are connected to Pins 7, 11, 13, and 15 in Board mode. Step 2: Write the following lines of code in your python file importRPi.GPIO as GPIO #imports gpio library import time #imports delay library GPIO.setmode(GPIO.BOARD) # tell the processor that the Pin numbering is as per board mode 12 Copyright © 2014 Inventrom. All rights reserved GPIO.setup(7,GPIO.OUT) #tell the processor Pin 7 is an output Pin #main code while True: #infinite loop GPIO.output(7,True) #Gives 3.3 volt output on Pin number 7 glowing LED on time.sleep(2) #keep it on for 2 seconds GPIO.output(7,False) #Gives 0 volt out on Pin number 7 glowing LED off time.sleep(2) #keep it off for 2 seconds Step 3: To save the code press “Ctrl + X” then press “y” and last click “Enter”. This will take you back to your command line. Step 4: Connect the ToppingPi board to the main Raspberry Pi board via a 26 Pin FRC connector. Make sure you refer to Annexed two for interfacing ToppingPi with the RaspberryPi board. Apart from Pin number 7 you can also perform this experiment using Pin number 11, 13, and 15 as there are 4 controllable LEDS on the ToppingPi Board. Step 5: To run the python script type following command in you command line $sudo python ledblink.py Step 6: You will now be able to see the LED glow ON and OFF (figure 10). To stop the script you can use “Ctrl + Z” Figure 10 Conclusion:-­‐
Raspberry Pi GPIO were studied and programmed to blink an LED on/off.
13 Copyright © 2014 Inventrom. All rights reserved EXPERIMENT 3
INTERFACING MOTORS TO RASPBERRY Pi
Aim: To control motors using Raspberry Pi. Theory: The L293 and L293D (figure 12) are quadruple high-­‐current half-­‐H drivers. The L293 is designed to provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive currents of up to 600-­‐mA at voltages from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-­‐current/high-­‐voltage loads in positive-­‐supply applications. 2 All inputs are TTL compatible. Each output is a complete totem-­‐pole drive circuit, with a Darlington transistor sink and a pseudo Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2 EN and drivers 3 and 4 enabled by 3,4 EN. When an enable input is high, the associated drivers are enabled, and their outputs are active and in phase with their inputs. When the enable input is low, those drivers are disabled, and their outputs are off and in the high-­‐impedance state. With the proper data inputs, each pair of drivers forms a full-­‐H (or bridge) reversible drive suitable for solenoid or motor applications. DC Bo Motor 60 rpm: Figure 11 Figure 12 14 Copyright © 2014 Inventrom. All rights reserved Procedure: Writing a new Python Programme Step 1: In shell command line type the following command $sudo nano motor.py This will open your nano editor and your file name will be motor.py. The “.py” is a required extension for the python interpreter to know that the file contains valid python script. Note: Motor control inputs to the l293d driver are 7, 11 for motor one and 13, 15 for motor two. Step 2: Write the following lines of code in your python file importRPi.GPIO as GPIO #imports gpio library import time #imports delay library GPIO.setmode(GPIO.BOARD) # tell the processor that the Pin numbering is as per board mode GPIO.setup(7,GPIO.OUT) #tell the processor Pin 7 is an output Pin GPIO.setup(11,GPIO.OUT) #main code while True: #infinite loop GPIO.output(7,True) #Gives 3.3 volt output on Pin number 7 GPIO.output(11,False) #Gives 0 volt out on Pin number 11 #this will give you one direction of the motor time.sleep(2) #keep it on for 2 seconds GPIO.output(7,False) #Gives 0 volt out on Pin number 7 GPIO.output(11,True) #Gives 3.3 volt out on Pin number 11 #this will give you second direction of the motor time.sleep(2) #keep it off for 2 seconds Step 3: To save the code press “Ctrl + X” then press “y” and last click “Enter”. This will take you back to your command line. Step 4: Connect the ToppingPi board to the main Raspberry Pi board via a 26 Pin FRC connector and power it on. Connect a motor on motor port one on the ToppingPi (marked red on image below). (figure 13) Apart from Pin number 7, 11 to control one motor you can also perform this experiment using Pin number 13 and 15 as there are 2 controllable motor out Pins on the ToppingPi Board. Step 5: To run the python script type following command in you command line $sudo python motor.py Step 6: You will now be able to see the motors turn forward and reverse. To stop the script you can use “Ctrl + Z”. You can also stop the motors by pressing freeze button marked (yellow) (figure 13) in the image below. 15 Copyright © 2014 Inventrom. All rights reserved Conclusion:-­‐ Figure 13 Interfacing motors with Raspberry Pi were studied and programmed to rotate in forward and reverse direction. 16 Copyright © 2014 Inventrom. All rights reserved EXPERIMENT 4
INTERFACING DIGITAL SENSOR
Aim: To get input from digital sensors such as switch, proximity and fire sensors using Raspberry Pi. Theory: Fire Sensor General Description The Fire sensor, as the name suggests, is used as a simple and compact device for protection against fire. The module makes use of IR sensor and comparator to detect fire up to a range of 1 metre. The device, weighing about 5 grams, can be easily mounted on the device body. It gives a high output on detecting fire. This output can then be used to take the requisite action. An on-­‐board LED is also provided for visual indication Pin Configuration The (figure 14) to the side is the top view of the fire sensor. Following is the Pin description with Pin 1 being the rightmost Table 2 Figure 14 17 Copyright © 2014 Inventrom. All rights reserved Proximity sensor General Description The TSOP-­‐OBSD–Single (figure 15) is a general purpose proximity sensor. Here we use it for collision detection. The module consists of an IR emitter and TSOP receiver pair. The high precision TSO receiver always detects a signal of fixed frequency. Due to this, errors due to false detection of ambient light are significantly reduced. The module consists of 555 IC, working in astable multivibrator configuration. The output of TSOP is high whenever it receives a fixed frequency and low otherwise. The on-­‐board LED indicator helps user to check status of the sensor without using any additional hardware. The power consumption of this module is low. It gives a digital output and false detection due ambient light is low. Pin Configuration The figure to the side is the top view of the fire sensor. Following is the Pin description with Pin 1 being the rightmost Table 3 Figure 15 The tactile switch is connected to Pin Number 3 on the ToppingPi board. 18 Copyright © 2014 Inventrom. All rights reserved Procedure: Writing a Python Programme Step 1: In shell command line type the following command $sudo nano inputs.py This will open your nano editor and your file name will be switch.py. The “.py” is a required extension for the python interpreter to know that the file contains valid python script. Step 2: Write the following lines of code in your python file importRPi.GPIO as GPIO #imports gpio library import time #imports delay library GPIO.setmode(GPIO.BOARD) # tell the processor that the Pin numbering is as per board mode GPIO.setup(3,GPIO.IN) #tell the processor Pin 3 is an input Pin GPIO.setup(12,GPIO.IN) #Fire Sensor GPIO.setup(16,GPIO.IN) #Proximity Sensor #main code while True: #infinite loop if GPIO.input(3)==True: #check if switch is pressed there will be 3.3v on this Pin print “Button is pressed” if GPIO.input(12)==True: #when fire sensor detects fire this Pin will be at 3.3v print “Fire Detected” if GPIO.input(16)==False: #when proximity sensor detects obstacle this Pin will be at 0v
print “Obstacle detected” Step 3: To save the code press “Ctrl + X” then press “y” and last click “Enter”. This will take you back to your command line. Connect sensor on digital Pins 12 and 16 marked (red) on image below (figure 16). You can also connect the sensors on sensor ports 18 and 22. Step 4: Connect the ToppingPi board to the main Raspberry Pi board via a 26 Pin FRC connector. Step 5: To run the python script type following command in you command line $sudo python inputs.py Step 6: You will now be able to see the printed statements depending on which sensor is triggered or switch input. 19 Copyright © 2014 Inventrom. All rights reserved Figure 16 Conclusion:-­‐ Sensors were interfaced with Raspberry Pi using the ToppingPi Board were studied and programmed to trigger print events on the Raspberry Pi. 20 Copyright © 2014 Inventrom. All rights reserved EXPERIMENT 4
INTERFACING SERVO MOTORS TO
RASPBERRY Pi
Aim: To control servo motors using Raspberry Pi. Theory: Servo motors are a type of electromechanical actuators that do not rotate continuously like DC/AC or stepper motors; rather they used to position and hold some object. They are used where continuous rotation is not required so they are not used to drive wheels (unless a servo is modified). In contrast they are used where something is needed to move to particular position and then stopped and hold there. Most common use is to position the rudder of aircrafts and boats etc. Servos can be used effectively here because the rudder does not need to move full 360 degrees nor they require continuous rotation like a wheel. The servo can be commanded to rotate to a particular angle (say 30) and then hold the rudder there. Servos also employ a feedback mechanism, so it can sense an error in its positioning and correct it. This is called servomechanism. So if the air flow exerts pressure on rudder and deflects it the servo will apply force in opposite direction and try to correct the error. Say if you ask servo to go and lock itself to 30 degrees and then try to rotate it with your hand, the servo will try hard and its best to overcome the force and keep servo locked in its specified angle. Servos (figure 17) are also used to control the steering of RC cars, robotics arms and legs. Figure 17 21 Copyright © 2014 Inventrom. All rights reserved Procedure: Writing a new Python Programme Step 1: In shell command line type the following command $sudo nano servos.py This will open your nano editor and your file name will be motor.py. The “.py” is a required extension for the python interpreter to know that the file contains valid python script. Step 2: Write the following lines of code in your python file import RPi.GPIO as GPIO #import gpio library import time #import delay library # set GPIO to be used in board mode GPIO.setmode(GPIO.BOARD) #The PWM Pin is GPIO 5 Board Mode GPIO.setup(5,GPIO.OUT) #main code while True: #for 20 ms total time period GPIO.output(5,True) #zero degrees 1ms second pulse time.sleep(0.001) GPIO.output(5,False) time.sleep(0.019) Step 3: To save the code press “Ctrl + X” then press “y” and last click “Enter”. This will take you back to your command line. Step 4: Connect the ToppingPi board to the main Raspberry Pi board via a 26 Pin FRC connector and power it on. Connect the servo motor to servo port on ToppingPi marked (red) (figure 18) on image below. Step 5: To run the python script type following command in you command line $sudo python servos.py Step 6: You will now be able to see the motors turn and hold zero degree position. To stop the script you can use “Ctrl + Z” 22 Copyright © 2014 Inventrom. All rights reserved Conclusion:-­‐ Figure 18 Figure 19 Interfacing motors with Raspberry Pi were studied and programmed to rotate in forward and reverse direction. 23 Copyright © 2014 Inventrom. All rights reserved EXPERIMENT 5 INTERFACING AN ANALOG SENSOR TO A
RASPBERRY Pi
Aim: To interface an Analog to Digital convertor IC (MCP3008) with Raspberry Pi and get input from an Analog sensor (LDR). Theory: MCP3008 ADC IC general description The MCP3008 10-­‐bit Analog-­‐to-­‐Digital Converter (ADC) combines high performance and low power consumption in a small package, making it ideal for embedded control applications. The MCP3008 features a successive approximation register (SAR) architecture and an industry-­‐standard SPI serial interface, allowing 10-­‐bit ADC capability to be added to any PIC® microcontroller. The MCP3008 features 200k samples/second, 8 input channels, low power consumption (5nA typical standby, 425µA typical active), and is available in 16-­‐Pin PDIP and SOIC packages. Applications for the MCP3008 include data acquisition, instrumentation and measurement, multi-­‐channel data loggers, industrial PCs, motor control, robotics, industrial automation, smart sensors, portable instrumentation and home medical appliances. Features : Parameter Name Value Max Sample Rate (k samples/sec) 100 Max. INL ± (LSB) 1 Max. Supply Current (µA) 500 Single-­‐
Input Type ended # of Input Channels 8 Resolution (bits) 12 Interface SPI Temp Range (°C) -­‐40 to +85°C Input Voltage Range (V) 2.7 to 5.5 24 Copyright © 2014 Inventrom. All rights reserved Procedure: Enable Hardware SPI To enable hardware SPI on the Pi we need to make a modification to one of the system files: $sudo nano /etc/modprobe.d/raspi-­‐blacklist.conf Add a ‘#’ character in front of the line spi -­‐bcm2708. Use CTRL-­‐X, then Y, then Return to save the file and exit. Reboot using the following: $sudo reboot To check the change has worked run the following command: lsmod You should see “spi _bcm2708″₺ listed in the output. Install Python SPI Wrapper In order to read data from the SPI bus in Python we can install a library called ‘py-­‐spidev’. To install it we first need to install ‘python-­‐dev’: $sudo apt-­‐get install python-­‐dev Then to finish we can download ‘py-­‐spidev’ and compile it ready for use: $mkdir py-­‐spidev $cd py-­‐spidev $wget https://raw.github.com/doceme/py-­‐spidev/master/setup.py $wget https://raw.github.com/doceme/py-­‐spidev/master/spidev_module.c $sudo python setup.py install 25 Copyright © 2014 Inventrom. All rights reserved Circuit The following list shows how the MCP3008 can be connected. It requires 4 GPIO Pins on the Pi P1 Header. VDD 3.3V VREF 3.3V AGND GROUND CLK GPIO11 (P1-­‐23) DOUT GPIO9 (P1-­‐21) DIN GPIO10 (P1-­‐19) CS GPIO8 (P1-­‐24) DGND GROUND The CH0-­‐CH7 Pins are the 8 analogue inputs. Figure 20 Writing a Python Programme Step 1: In shell command line type the following command $sudo nano analog.py This will open your nano editor and your file name will be switch.py. The “.py” is a required extension for the python interpreter to know that the file contains valid python script. Step 2: Write the following lines of code in your python file 26 Copyright © 2014 Inventrom. All rights reserved import spidev import time import os spi = spidev.SPiDev() # Open SPI bus spi .open(0,0) # Function to read SPI data from MCP3208 chip def ReadChannel(channel): # Channel must be an integer 0-­‐7 adc = spi .xfer2([1,(8+channel)<<4,0]) #send 3 bytes for initialization and channel number data = ((adc[1]&31) << 8) + adc[2] #adc[1] contains MSB 4 bits adc [2] contains LSB 8 bits return data # Function to convert data to voltage level, def ConvertVolts(data,places): # rounded to specified number of decimal places volts = (data * 3.3) / float(1023) volts = round(volts,places) return volts # LDR connected to channel 0 light_channel = 0 # Define delay between readings delay = 5 while True: # Read the light sensor data light_level = ReadChannel(light_channel) light_volts = ConvertVolts(light_level,2) # Print out results print("Light: {} ({}V)".format(light_level,light_volts)) # Wait before repeating loop time.sleep(delay) Step 3: To save the code press “Ctrl + X” then press “y” and last click “Enter”. This will take you back to your command line. You can also connect the sensors on analogue sensor ports 1 to 7 Step 4: Connect the ToppingPi board to the main Raspberry Pi board via a 26 Pin FRC connector. Step 5: To run the python script type following command in you command line $sudo python analog.py Step 6: Connect the LDR Circuit as shown below (figure 21) and interface it with your ToppingPi. You will now be able to see the sensor values being printed continuously on the putty command screen 27 Copyright © 2014 Inventrom. All rights reserved Figure 21 Figure 22 Conclusion:-­‐ Interfacing an external ADC with the Raspberry Pi was studied and programmed to read resistance of an LDR. 28 Copyright © 2014 Inventrom. All rights reserved ANNEX 1 Raspberry Pi GPIO 29 Copyright © 2014 Inventrom. All rights reserved ANNEX 2 Interfacing RaspberryPi to ToppingPi All one need to do to interface Inventrom’s ToppingPi to Raspberry-­‐Pi is connect a 26 FRC cable from the ToppingPi’s Connector to The Raspberry Pi as shown in the illustration below While connecting the FRC cable one must ensure the Notch present on the cables end connectors must 1) Be co-­‐incident with the notch present on the 26 Pin Box connector of the ToppingPi & 2) The notch present on the Raspberry Pi’s end should be towards the inner side of the Raspberry Pi GPIO header one. If both points one and two are carried out correctly the Pi shouldn’t have any trouble in powering up. TO POWER TOPPINGPI: Connect a 12v dc adapter to the DC jack port present on the ToppingPi. You can also connect a 12v battery on the battery port provided on the ToppingPi. 30 Copyright © 2014 Inventrom. All rights reserved