Connecting the raspberry pi to a wifi network with a static IP

This is a simple thing, there is nothing special about the PI, first, connect it to a wireless dongle (USB is your only option anyways), then create a file with your network settings, because of the scenario this is written for, and it is written as a reference for someone, I will connect it to an android hotspot, the subnet here is specific to android, others should use your own according to their router.

1- create the following file at /etc/wpa_supplicant/wpa_supplicant.conf


Now, modify the file /etc/network/interfaces


Note on PATA – IDE 1.8″ 2.5″ compatibility and difference

Just because this took a lot of research from me (Looking at specs), I am posting this here for my own reference.

Note: CF cards will work on both 3.3V and 5V. so there is a bit of a mystery on why we need a voltage step down chip and a jumper for this particular adapter, other drives are clearly incompatible IDE interfaces.

it turns out that when combined with a converter using the fc1307a chip to create CF out of 2 SD cards, it will not work without a voltage step down, with the wrong setting, or with cards with no step down, a computer will see the combined cards, but will fail when trying to format them for some reason.

The 1.8 adapter (Sideways IDE interface) is 3.3V, the normal 2.5 disks are 5 Volt, the adapter we have that turns CF cards into 1.8 or 2.5 compatible drive, has a JUMPER to select, this jumper effectivly activates or deactivates the voltage step down chip (The only chip on the board)

So there you have it, 1.8 and 2.5 PATA drives are not compatible regardless of the fact that the PIN interfaces are the same. the adapters with a voltage step down will work on both, but you need to set them up first with a JUMPER

Raspberry PI camera, quick guide

For those who want a real lowdown right away, here is the final verdict, as of the time of writing this, there are no faster options, the limitations here are imposed by the creators of PI and it’s chips (The Broadcom GPU)

You have 2 options for capturing stills in burst mode. In the case i am addressing here, taking photos of rapidly moving objects in broad daylight, so the shutter speed is very fast, the ISO is not so high (Because of the sun).

1- Through the GPUs stills part of the processor, you would get less than 2 frames per second, you can use the timelapse function.

2- Through the video port on the GPU, this will allow a maximum of 15 frames per second at 5MP resolution, no binning, no sensor cropping, but the still port gives somewhat better photo quality


The speed of storage counts, if your storage becomes a bottleneck, 15FPS will not be possible.

1- You can use faster USB storage, the USB port is bound to a maximum of 45MB/Second

2- A fast memory card, currently 25MB/s comes on expensive “Professional” SD cards, i would rather use the USB port

3- Splitting the bandwidth between storage and Ethernet is not a good idea, the Ethernet adapter on the raspberry PI is connected through USB, so it will share the USB bandwidth 😉

4- Splitting the storage or buffering some of the frames on the SD card can be a good idea, as the SD card is connected directly to the CPU not through USB

5- Lowering the photo quality through increased performance will give you good mileage, something equivalent to what other programs call 80% quality will reduce the size pretty well without sacrificing much.

How to get through the stills port

raspistill -o %04d.jpg -ss 5000 -ISO 300 -t 10000 -tl 100 -q 10 -th none

So, the questions that come to mind instantly are, how come quality is a value from 0 to 100 and we are using 10 ? it is a good question, and this is something that is not making sense i know, but judging with my eyes, -q 10 will give us good compression ratio and the photo is still good, the range between 10 and 100 does not make much difference, and then under 10, things go very bad rapidly, no idea why

Now to the next method, which is getting photos from the video port… here is a quick and dirty picamera python script

If you don’t know how python works, please don’t change the indentation, indenting the print statement will add the print to the previous code block which is something we don’t want.

import time
import picamera

frames = 60

with picamera.PiCamera() as camera:
    camera.resolution = (2592, 1944)
    camera.shutter_speed = 5000
    camera.iso = 100
    camera.framerate = 10
    start = time.time()
        '/usbstick/image%02d.jpg' % i
        for i in range(frames)
        ], use_video_port=True)
    finish = time.time()
print('Captured %d frames at %.2ffps' % (
    frames / (finish - start)))

So simply put, if you are running raspbian, you need to get into the pi config (command is raspi-config), and enable the camera then reboot

Also, don’t forget to run “rpi-update” or apt-get upgrade

Now if you try to take a photo you would enter the command

raspistill -o cam.jpg

But this will take a long time to take one photo (5 seconds by default), this is because it needs to set the exposure, if you want to give it less time you could run the command

raspistill -t 1500 -o test.jpg (One and a half seconds)

But that’s is too long, i already know that it is broad daylight, and that i need a very fast shutter speed, So how do i manually set things ?

Taking a photo of fast moving things in the SUN, i would run the command as follows

raspistill -t 1 -ss 1000 –awb sun -o test1.jpg

Taking photos of moving things in cloudy weather, i would run the command as

So, here are the manual things

–ss 1000 (1 ms, good for a sunny day oudoors, 4ms is good on a cloudy day, with dim light, i would recommend bumping this up a bit)

–ISO 300 (Sensitivity, Back in the day, the film dictated this property), the faster the shutter (Lower value), the higher the needed sensitivity (ISO VALUE), the range is 100 to 800


Prsets for Automatic white balance (AWB)

–awb sun