How to use

Originalartikel

Backup

<html> <h2>Soldering the header on to the LISIPAROI</h2> <p>A small amount of soldering is needed to add the LISIPAROI header to the board. A selection of different postitions is possible depending on your project and placement.</p> <p>Choose your desired header that you require and using a small amount of BluTac to hold the header in place, add the soldering iron to the first pin, followed by the solder wire.</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/blutakheader.jpg“><img class=„alignnone size-medium wp-image-65“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/blutakheader-300x300.jpg“ alt=„blutakheader“ width=„300“ height=„300“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/blutakheader-300x300.jpg 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/blutakheader-150x150.jpg 150w, http://www.lisiparoi.com/wp-content/uploads/2014/11/blutakheader-1024x1024.jpg 1024w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a> <a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/solderheader.jpg“><img class=„alignnone size-medium wp-image-66“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/solderheader-300x300.jpg“ alt=„solderheader“ width=„300“ height=„300“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/solderheader-300x300.jpg 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/solderheader-150x150.jpg 150w, http://www.lisiparoi.com/wp-content/uploads/2014/11/solderheader-1024x1024.jpg 1024w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p> <p>Repeat this until all the headers have been soldered in place.</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/headersoldered.jpg“><img class=„alignnone size-medium wp-image-67“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/headersoldered-300x300.jpg“ alt=„headersoldered“ width=„300“ height=„300“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/headersoldered-300x300.jpg 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/headersoldered-150x150.jpg 150w, http://www.lisiparoi.com/wp-content/uploads/2014/11/headersoldered-1024x1024.jpg 1024w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p>

<h2>Attaching to the camera module</h2> <p>Push the bolts through the LISIPAROI and screw the nut on to the back.</p> <h2><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/Addnuts.jpg“><img class=„alignnone size-medium wp-image-71“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/Addnuts-300x300.jpg“ alt=„Addnuts“ width=„300“ height=„300“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/Addnuts-300x300.jpg 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/Addnuts-150x150.jpg 150w, http://www.lisiparoi.com/wp-content/uploads/2014/11/Addnuts-1024x1024.jpg 1024w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></h2> <p>Add the camera module, and screw the remaining 2 nuts to hold it all in place.</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/completeback.jpg“><img class=„alignnone size-medium wp-image-69“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/completeback-300x300.jpg“ alt=„completeback“ width=„300“ height=„300“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/completeback-300x300.jpg 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/completeback-150x150.jpg 150w, http://www.lisiparoi.com/wp-content/uploads/2014/11/completeback-1024x1024.jpg 1024w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p> <p>Trim the bolts to the desired length. Don&#8217;t cut yet if you are planning to add any bracket/support.</p> <h2><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/trimmed.jpg“><img class=„alignnone size-medium wp-image-70“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/trimmed-300x300.jpg“ alt=„trimmed“ width=„300“ height=„300“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/trimmed-300x300.jpg 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/trimmed-150x150.jpg 150w, http://www.lisiparoi.com/wp-content/uploads/2014/11/trimmed-1024x1024.jpg 1024w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a> <a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/complete.jpg“><img class=„alignnone size-medium wp-image-72“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/complete-300x300.jpg“ alt=„complete“ width=„300“ height=„300“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/complete-300x300.jpg 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/complete-150x150.jpg 150w, http://www.lisiparoi.com/wp-content/uploads/2014/11/complete-1024x1024.jpg 1024w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></h2> <h2></h2>

<h2>Wiring up the LISIPAROI</h2> <p>The LISIPAROI has been designed to be powered from the Raspberry Pi providing enough power is available, if not a seperate power supply of 5 volts can be used.</p> <h3>Wiring up to the Raspberry Pi</h3> <p>If you are using a power supply rated 2A or more, you can power your LISIPAROI directly from the Raspberry Pi.</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/Connecting.png“><img class=„alignnone size-medium wp-image-59“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/Connecting-300x268.png“ alt=„Connecting“ width=„300“ height=„268“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/Connecting-300x268.png 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/Connecting-1024x914.png 1024w, http://www.lisiparoi.com/wp-content/uploads/2014/11/Connecting.png 1353w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p> <p>Connect the 5v on the LISIPAROI to the 5v (pin 2) on the Raspberry Pi</p> <p>Connect GND (only 1 is needed) to the Ground (pin 6) on the Raspberry Pi</p> <p>Connect GPIO to the 3v3 (pin 1) on the Raspberry Pi</p>

<h3>Wiring up the LISIPAROI with additional batteries</h3> <p>If you are using a low powered battery pack or a power supply not capable of supplying 2Amp an external battery pack can be used to power the LISIPAROI. Adding 3 AA akaline batteries capable of 4.5v is sufficient to use without a regulator. Just add the wires as shown, paying close attention to the placement of the <strong>GPIO</strong> and <strong>5v</strong> pins.</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingBatt.png“><img class=„alignnone size-medium wp-image-62“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingBatt-300x252.png“ alt=„ConnectingBatt“ width=„300“ height=„252“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingBatt-300x252.png 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingBatt-1024x861.png 1024w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingBatt.png 1438w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p> <p>When using an external power supply, both GND (grounds) will be needed, so double check their placements before adding any power to save the risk of damaging the Raspberry Pi or shorting the batteries.</p>

<h3>Powering it all up</h3> <p>When power is added to the Raspberry Pi the LISIPAROI will be turned on. If you have the Infrared version you won&#8217;t see any difference visually, but viewing with your smartphone camera you will notice faint purple glows on the LEDs.</p> <p>If you wish to control the LISIPAROI via Python/Scratch/Any other programming language skip down to <strong>Controlling from the Raspberry Pi</strong>.</p>

<h2>Using it with a switch</h2> <p>You will need a tactile switch, a breadboard and a 10k resistor.</p> <p>Place&#160; the tactile button on the breadboard, and add the resistor as shown. Pay close attention to the orientation and placement of the wires to take care not to short circuit the power circuitary on the Raspberry Pi.</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingSwitch.png“><img class=„alignnone size-medium wp-image-61“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingSwitch-300x268.png“ alt=„ConnectingSwitch“ width=„300“ height=„268“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingSwitch-300x268.png 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingSwitch-1024x914.png 1024w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectingSwitch.png 1353w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p> <p>When pressing the button with the Raspberry Pi powered up will turn on the LISIPAROI.</p>

<h2>Controlling from the Raspberry Pi</h2> <h3>Hooking up to a GPIO Pin</h3> <p>In this example GPIO 4 will be used to turn on the LISIPAROI, although any digital GPIO pin will work. Swap the 3v3 jumper wire to a chosen GPIO (or to 4 as pictured)</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIO.png“><img class=„alignnone size-medium wp-image-77“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIO-300x268.png“ alt=„ConnectoGPIO“ width=„300“ height=„268“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIO-300x268.png 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIO-1024x915.png 1024w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIO.png 1353w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIOBatt.png“><img class=„alignnone size-medium wp-image-76“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIOBatt-300x252.png“ alt=„ConnectoGPIOBatt“ width=„300“ height=„252“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIOBatt-300x252.png 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIOBatt-1024x861.png 1024w, http://www.lisiparoi.com/wp-content/uploads/2014/11/ConnectoGPIOBatt.png 1438w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p>

<p>Switch on the Raspberry Pi, and add the batteries (if external power is being used).</p> <h3>Switching the LISIPAROI on and off</h3> <p>Login remotely via PuTTY or start LXTerminal on the Raspberry Pi.</p> <p>Create a new file by typing <strong>sudo nano flash.py</strong>&#160; [Enter]</p> <p>And paste the following code;</p> <blockquote><p>import RPi.GPIO as GPIO</p> <p>import time<br />import picamera</p> <p>GPIO.setmode(GPIO.BOARD)<br />GPIO.setup(4, GPIO.OUT)</p> <p>GPIO.output(4, GPIO.HIGH)<br />with picamera.PiCamera() as camera:</p> <p>camera.start_preview()<br />time.sleep(5)<br />camera.capture(&#8216;/home/pi/Desktop/test.jpg&#8217;)<br />camera.stop_preview()</p> <p>GPIO.output(4, GPIO.LOW)</p></blockquote>

<p>It should look like this, just press <strong>CTRL</strong> + <strong>X</strong> to exit, press <strong>Y</strong> to save, and then <strong>Enter</strong> to confirm the filename.</p> <p><a href=„http://www.lisiparoi.com/wp-content/uploads/2014/11/code-start1.png“><img class=„alignnone size-medium wp-image-79“ src=„http://www.lisiparoi.com/wp-content/uploads/2014/11/code-start1-300x193.png“ alt=„code-start“ width=„300“ height=„193“ srcset=„http://www.lisiparoi.com/wp-content/uploads/2014/11/code-start1-300x193.png 300w, http://www.lisiparoi.com/wp-content/uploads/2014/11/code-start1.png 721w“ sizes=„(max-width: 300px) 100vw, 300px“ /></a></p>

<p>To run the program, type in <strong>sudo python flash.py</strong> followed by enter. The LISIPAROI should switch on, a picture is taken. After 5 seconds the LISIPAROI will then switch off.</p>

<p><em>Python code by <a href=„http://www.tecoed.co.uk/“ target=„_blank“>TeCoEd</a></em></p> </html>