I have owned a Raspberry PI (RPi) for almost 12 months and must admit that when I first picked it up alongside an Aruduino I was thinking why would I want to run this? The graphics looked awful, it was slow and I was more limited by software that I was on my home machine and school network. However, I’m in the process of being converted and over the last couple of weeks have seen how the RPi does have a place in my classroom.
These are my setup notes combined with a user review the Synology DS412+. We have bought this device so we: can host some websites from home with low bandwidth high storage requirements; have remote access to files etc; and have a shared drive on our LAN rather than leaving our iMacs on;
The SynBox will initially be loaded with 4x Western Digital 1TB drives that we have left over from our down graded Ubuntu server. I have completed a SmartCtl Extended Test Reports on these drives and hope despite the extended hours they will work ok for the time being.
– post in progress —
Having purchased the basics of a Line Following Robot from Robot Bits and purchased some lovely little QR1113 sensors from Proto-Pic I have finally found time to put everything together and program Lionel Mk1 – The Line Following Robot.
The Robot Shield from RB is a gem and assembly took me about an hour which isn’t bad given I have not soldered in 10 years. Thankfully it also worked first time with no mistakes. The shield comes with its own Arduino library RobotShield.zip but at the time of writing I needed to modify this to work with Arduino Version >1.0. If you get an error along the lines of WProgram.h: No such file or directory you will need to edit the library files and change the WProgram.h include to Arduino.h as the header was renamed from version 1.0.
Also in the end I didn’t use the library as I wanted to control the direction of the robot by subtly adjusting the speed of each motor – something that the library doesn’t allow.
The first thing I need to know was how the sensors worked so I found a good little Bildr post which led to my first attempt being based on instinct more than knowledge. Although it resulted in moderate success I knew I needed to do more research. I was lucky to find a very good Building Autonomous Line Followers with Arduino! article on MB Robot Games. This directed me towards PID Control, a generic feedback loop system. Through further research on the internet I then found a Pololu guide and Arduino Library for the sensors I was using.
After some playing I was able to get a basic robot following the line that: would go around corners; and stop when it reaches the end of the line. At this point my batteries finally died and so I upgraded from a single 9v to a six fresh 1.5v batteries. The effect was to increase the power going to the wheels and thus changing all dynamics of the robot and undoing all my progress of the day!
I’ll update this with more info when I have made some further revisions.
In this experiment I am going to use my first outside library to add Capacitive Sensing to the Arduino as demonstrated on You Tube. This is the same technique used by most modern touch screen such as the iPad and iPhone and this feature is brought to the Arduino via the CapSense library written by Paul Badger.
My first introduction to the Arduino was at the CAS Programming for teachers event this year at UWE Bristol. We had a choice between Lego Mindstorm and the Arduino.
Shift Registers are a type of Integrated Circuit (IC) or chip. The Shift Register is a serial to parallel convertor that allows us to control eight additional output pins with just three on the Arduino. You can link them together to give you even more (unlimited) outputs!
A Shift Register works by clocking in the data and then locking (or latching) it. This is achieved by setting the data pin to high or low and then pulsing the clock. This is repeated until you have shifted out eight bits of data and set all the pins. Now you can pulse the latch and all eight bits are output to their representative pins.
Servos can be used for lots of things where a great detail of control is needed such as steering RC vehicles, robotics and freaking out small children with moving dolls. Standard Servos like the one provided by Oomlout travel through 0 to 180 degrees with positioning controlled via a timed pulse. Timing varies with manufacturer but for example a pulse sent every 25 to 50 ms will run the servo smoothly.
The Arduino will allow you to attach low power devices directly to its pins but items such as motors requiring more power require a transistor. A Transistor allows you to switch big volts using little volts. In circuit 03 we wil be switching a motor.
It uses a 1N4001 diode to act as a flyback diode which eliminates or suppresses voltage spikes seen across an inductive load when a voltage supply is suddenly reduced or removed.
So in the second starter circuit multiple LEDs are linked up and patterns created. The first one turns each LED on before turning each LED off. It uses an array and a couple of for loops. You can read the full explanation on ardx.org.
This is the first ‘getting started’ circuit that makes an LED blink on and off as per the Ardx explanation. The circuit is nice and simple using just the big LED, a 560 ohm Resisitor (Green-Blue-Brown) and a wire to link the positive leg (long) of the LED to the digital pin 13 on the Arduino.
So I’ve long held back from signing into one of the free cloud resources due to concerns over privacy. I’ve used Google Docs for a few non-descripto documents but nothing more. However, having just placed an order for an iPad3, I’m looking to improve my remote working and document management. I don’t want to be dragging my laptop everywhere with me next year. There is not an iPad app for the ‘new’ Google Drive and writing Google Docs on the iPad just doesn’t work. Pages, Numbers and Keynote are all apps of notoriety for the right reasons so how can I import/export easily from this? Bottom line I can’t. Dropbox allows documents to open into Pages but not the reverse. It appears WebDav is the only option so this is how I’ve set mine up on our home Ubuntu 10.10 server.
So we’ve had need to open a couple of ports on our home-server to the real-world. Its like letting a child out in the evening for the first time alone – you’ve no idea what trouble they might get into but just hope you’ve prepared them enough.
These are my notes for when I forget what I’ve done.
The router is only forwarding HTTP and SSH traffic to the server. SSH has been locked down so it only accepts Key logins from non-root users so I think this is pretty good. The default site forwards via .htaccess to this domain which prevents general rumblings if you find it and only certain external subdomains are identified in the server’s /etc/hosts file.
Denyhosts is installed.
UFW Firewall has been configured using
sudo ufw default deny sudo ufw allow ssh sudo ufw allow www sudo ufw allow 10000 sudo ufw allow 443 sudo ufw allow Samba sudo ufw allow 5901 sudo ufw enable
Apparently, its possible to use allow webmin but this didn’t seem to work in this instance.
So if you are running MAMP on your Mac and baking some CakePHP you may encounter errors when trying to run the Cake Console.
The error is likely to look something like
Warning Error: PDO::__construct():  No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in [/rootpath/lib/Cake/Model/Datasource/Database/Mysql.php, line 160]
Add the following to your database.php config file.
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'