Right to the wire to finish this project. This has been so much fun and a challenge. The software used included Java, C++, Python and Linux. I used several tools including;
1. SD Formatter: https://www.sdcard.org/downloads/formatter_4/
2. Win32diskimager: http://sourceforge.net/projects/win32diskimager/files/latest/download
3. FileZilla : https://filezilla-project.org/download.php?type=client
Access Point for extending WIFI range
One issue I had was the short range for WiFi outside the house. I looked at several tutorials for building a Access point and the Arch Wipi worked right out of the box. I could not make it wireless as the signal strength was too weak. It was stronger than our wireless in the house and I was impressed at the range it extended the WIFI .
Arch Linux Raspberry Pi WiFi AP Requirements for Rasoberry Pi Model B Revision 2.0
Power adapter with at least 1500 mA (2 amp recommended)
Minimum 2GB SD Card Fat32 formatted
Wifi USB dongle
Network Cable with Internet access
Image Installation and Access Point Setup
- Download Arch Linux Wireless Raspberry Pi image: https://sourceforge.net/projects/archwipi/files/latest/download
Extract it. eg: sudo tar zxf archwipi.img.tar.gz
Optional – extend partition to use all of disk. You can use gparted. (I used Raspi-config)
Plug your internet cable and new Arch WiPi SD card into your Raspberry and power it on.
Everything is automated so after a minute or so scan for a new network SSID = archwipi
If you don’t see the archwipi SSID, then it means you need to manually install your Wi-Fi dongle drivers. I had no issue and the SSID was an option on all the Raspberry Pi computers as a wirelesss network.
The wifi password is: 1010101010
If you need to login to the Pi the credentials are: root | archwipi
You can change the WiFi password to whatever you like by editing: /usr/lib/systemd/system/create_ap.service
Check CPU speed, temperature and more using ./bcmstat.sh
You can also view graphs of Pi stats, browse to this address (Pi’s IP Address):8080/
Raspberry Pi Camera (Two ways)
I decided to use two ways to take pictures. One ways was to use the Raspi-Pi cam and also the Snap Camera with the Pi Face Display and Control:
Raspi-Pi cam
Detailed documentation can be found at:
http://elinux.org/RPi-Cam-Web-Interface
Once the software is installed please note that RaspiStill command will not work if you are testing the camera. The basic installation is:
- Install Raspbian on your RPi
- Attach camera to RPi and enable camera support with sudo raspi-config
- Clone the code from GitHub and run the installer with the following commands:
git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface
chmod u+x RPi_Cam_Web_Interface_Installer.sh
./RPi_Cam_Web_Interface_Installer.sh install
After the install you need to reboot the Raspberry Pi. Once that is completed you can view the GUI in a browser. I found either Chrome or Firefox worked well. This GUI has many features including Timelapse and Motion Detection. The files are stored in a specific location so I found a way to use Dropbox to store the pictures in real time on my laptop and Blackberry . I did investigate a couple of cloud apps but this seemed to be the easiest.
Adding Dropbox to the Raspberry Pi
You need to set up a DropBox account and then set up an app to link to your Raspberry Pi. You can set up your app at: https://www.dropbox.com/developers/apps/
I played with some choices but found the File Type version seemed to work well. As you can see it supplies an App Key and App Secret. You will be using this to link to your Pi.
ow we want to install Dropbox for Raspberry Pi:
git clone https://github.com/andreafabrizi/Dropbox-Uploader/
Once downloaded you can make the script executable by using the following command:
chmod +x dropbox_uploader.sh
The first time you run the script you will be asked to enter the App Key and App Secret.
./dropbox_uploader.sh
HINT: Copy the Keys to a text editor first rather than copy and paste to Putty from DropBox. Otherwise it does not play nice and you may have errors. I used Word. Once your Keys are accepted it will ask you to open up a URL to confirm connection. Assuming you are using Putty, copy the contents to your clipboard and paste to a text editor. Now copy the URL to a browser. You may receive a message from Dropbox that the connection is successful but unless you perform the last step in Putty the token may still fail. Some oauth tokens are corrupt so you may have to try a couple of times.
RaPiCamcoder stores media files in /var/www/media. So I want a script to pull the .jpg files to Dropbox and see the media on my Blackberry and Laptop in real time. I tried a couple of test.jpg and it seemed to work like a charm.
I used this script to start the downloader:
pi@raspberrypi ~/Dropbox-Uploader $ ./dropbox_uploader.sh upload /var/www/media/ {*.jpg*} /Apps/PiRover
This was tricky. Most documentation did not include a target file for the upload and failed. I took several scripts and reduced the code to one line and added the target DropBox. The command tells Raspberry Pi to upload all files ending in .jpg in /var/www.media (location that Raspi_Cam_Web stores the images) and upload to my DropBox App called PiRover.
I setup a full dropbox instead for final testing and called it PiRover. When I ran the script the images stored in /var/www/media uploaded to DropBox at a fairly good speed and now is accessible on my Blackberry and Laptop in minutes.
A cron job is added to run the script every minute and I’m done! I will add a cleanup cron job so the SD card does not fill up too fast. I’ll have some videos posted soon. Please do not rain.
SnapCamera
A complete guide can be found here:
http://www.piface.org.uk/guides/how_to_use_snapcamera/install_snap_camera/
Basic install instructions are:
Install snap camera with the command
sudo apt-get install python3-snap-camera
Start SnapCamera by running
snap-camera
GPS Real Time Tracking
Most of my effort went to programming the Raspberry Pi and Microstack GPS to provide . The Microstack GPS unit was installed as per the instructions:
sudo apt get update
sudo apt get install
sudo apt get install gpsd gpsdclients pythongps
Disable the Serial Port from raspiconfig
● From the menu choose Advanced Options.
● Then choose serial.
● When asked “would you like a login shell to be accessible over serial?” choose ● A message saying “serial is now disabled” will appear.
● Exit raspiconfig and reboot the Raspberry Pi
Then: sudo dpkgreconfigure gpsd
● Choose when asked if you want to start gpsd automatically.
● Choose when asked “should gpsd handle attached USB GPS receivers automatically”.
● When asked which “Device the GPS receiver is attached to”, enter /dev/ttyAMA0.
● Accept the defaults for other options.
Now test the GPS with: cgps s
Creating a Real Time GPS Tracking
- Sharing using a Google Earth KMZ file
- Live data provided by Microstack GPS
- Connected to the Raspberry Pi via /dev/ttyAMA0
Robot Chassis (My first Robot)
Well I went with the Half_Pint Runt Rover that came with no instructions. I'm not sure if its because I'm left-handed or Canadian but I fund this a challenge to assemble. I did find a 3D diagram and a short video that helped put the kit together.
Attaching the motors to the Gertbot
A comprehensive datasheet can be found here:
http:///datasheets/1862080.pdf
The schematic was helpful in connecting the motor coils and power supply to the GertBot.