Category: Blog

Byte Insight

Python – Strings

A string is a list of characters and, in Python, they are easy to declare using speech marks.

myquote = “Talk is cheap. Show me the code.”

Network Configuation

One problem with using a Raspberry Pi in school is that you are protected from evil-web-ness by the PxxxY.  You see we cannnot even say the word without getting this page blocked too.  This page explains how to set up your RPi so you can access the network and internet.

Raspberry Pi

The Raspberry Pi is the infamous credit card sized computer that has revitalised the computer based experiementation first seen with the BBC Micro in the 1980s.   It runs a special flavour of Linux called Raspbian, which encourages students to explore the inner workings of a modern operating system.  The Pi comes with GPIO (General Purpose Input/Output) pins that allow it to be connected to external devices ranging from LEDs and motors to temperature and movement sensors.   There many things that you can do with a Raspberry Pi including:

Pi Hacking

The aims of this exercise are to explore a small LAN looking at:

  • the sort of information we can collect.
  • some of the command line tools that are available.
  • how we can communicate across the network

RPi Twitter Led

This program follows on from the standard Python Twitter experiments.

The original inspiration for this whole experiment came from a @Rob Bishop (OCR) Raspberry Pi Recipe Card.  The objective of the program is to light an LED every time a tweet containing a particular word is sent to a certain person.

Zumo Lines

The Zumo Robot Shield can be fitted with a Reflectance Sensor Array that allows it to solve different line/maze style problems. The Zumo Shield libraries provide methods to help read values from the sensor array. Packages and installation instructions can be downloaded from GitHub and once installed the sensor library can be included from Sketch > Include Library.  The sensor array uses the QTR sensors and therefore their library must also be included (installed as standard).

Serial

The Arduino Serial functionality can be used for both debugging and sending data to and from the device via other communication channels such as BlueTooth.

Zumo Inertia

The Zumo Robot is fitted with a set of Inertia Sensors that can be used to detect collisions and determine bearings/direction. The later 1.2v of the Zumo Shield includes a Gyroscope.  

MySql – Feedback

Getting helpful feedback from MySQL when it errors is possible if you use the following:

mysql_query($sql) or die('Some useful message:' . mysql_error() );

MySql – Relationships

Dealing with relationships in MySql is not as straightforward as either MS Access or as you would have hoped for. Creating simple primary keys isn’t too difficult