This part is to change the look of the console font.
You should be able to skip this section if things are fine, but you might get to a point where characters on the screen show up as squares, or maybe you just want a nicer looking font to work with.
Run the below command once you have logged in:
sudo dpkg-reconfigure console-setup
Select the below settings, Terminus being a useful programming font.
That should fix up most issues; You might have to try some Latin with Cyrillic if there's still squares, or post a screenshots in the issues tab of the project page on github.
Configuring the system (and fixing the keyboard)
Naturally, without a desktop it is a little less intuitive to set up the system and connect to things like the WiFi. Below is the raspi-config command and all the settings we have used in our setup for this project.
If you were to type " on the keyboard, you will realise that it comes up as @ - this is a fairly annoying problem on the raspberry pi, and is due to the creators being based in the UK.
Run the below command and set options as shown.
sudo raspi-config
Localisation Options
Keyboard Layout
Generic 105-key PC (intl.)
English (US)Â (with no additional information)
You can also set other localisation options, for things such as time and numbers, but it's not incredibly important for the time being.
Then press Tab and Right to select Finish, then reboot and log in again.
Downloading the project
Once the system is set up, run the below commands.
wget https://github.com/Jaycar-Electronics/Pan-Tilt-Camera/archive/master.zipunzip master.zipcd Pan-Tilt-Camera./install-pan-tilt-camera.sh
As a point of reference, here is a list of all the things that the script will be doing:
setting the system to download files from australian servers (which is quicker).
running an update and refreshing what is installed.
Downloading the RPi_Cam_Web_Interface
unzipping, renaming, and copying the config file from before into it.
Installing the rpi cam interface.
Enabling pan and tilt in the interface
Installing the "driver" for the pan-tilt bracket.
Connecting everything up and getting it ready for boot.
You'll find that this might take a little while, but you should get a screen that looks like this:
This is just a collection of settings which you can just leave as default. The Cam subfolder will change the location of the web-interface to be in https://ip-address/cam-subfolder - it shouldn't hurt if you change it, but if it does, submit an issue on github.
Press Tab to select Ok and press enter, it will then download a tonne more packages.
(If you're really interested, you can find more information about the configuration options in the Further Reading section.)
Once that is done, it will ask if you want to start now; It doesn't matter what you choose as our script will reboot the system anyway.
Assembly of the Pan Tilt Bracket kit
The original pan tilt kit was designed for a different type of camera, however we can simply snip off the two clips and have a nice flat backing plate to mount the camera onto.
The first thing to do is to use the + piece from one of the servo packets and snip that to size so it fits inside of the base of the pan tilt kit, as shown below:
Once this is in, you can screw it into place with some small screws or use some super-glue (NA1500) to hold it together
You can then attach the two halves onto the servo and clip them together, before placing into the base so that it looks like the below picture. There should be some screws in the pan-tilt bracket to screw the two halves together.
Do not screw the base hub to the servo yet! it will need to be adjusted to the right angle. If you reset the raspberry Pi, the servos should automatically adjust to 90 degrees.
Once the servos are at 90 degrees, then you can screw the hub into the base so that it is positioned straight.
The tilt bracket is easy enough as you can screw it to the back of the plate as such; notice how the single arm piece is coming out of the bottom of the bracket.
Once that has been done, you can then bend open the two halves from before and slip it in to place, so the final assembly should look something like the below image:
Make sure that the servos are at 90 degrees again, and push in the final servo arm piece into the space as shown on the picture. You will have to snip it down to size so that it can fit.
Once that has been done, you can use hot glue, double sided tape, or glue-strips to mount the camera onto the plate; Make sure that the cable has full range of movement, as shown in the picture below. We bent the camera cable to come from out the
Also note The pinout in the picture above is incorrect, you need to connect the servos to pin 16 and 18.
Pinout connection
Connect the camera into the camera connector on the rasberry pi, then attach the gpio shield ontop of the pi; We made the camera cable come out the back, near the ethernet port, so that there's more room for the pan tilt bracket to move around with the camera attached.
Connect the servos so that the red wire is connected to power, brown wire is connected to ground, and the yello wire is connected to the data pin, on the pinout table as below:
|
|
---|
pan, on the base of the bracket | 16 |
tilt, on the camera side of bracket | 18 |
If you want to change the pinout locations, you can do so by editing /etc/init.d/servoblaster.sh once the system has been installed.