Category: Blog

Byte Insight

MySql – Create Database

If you need to create a database via the command line (or through the MYSQL prompt in PHPMyAdmin) then you can use the following where dynamo is the name of the database you wish to create. See W3Schools/Create DB for more information.

CREATE DATABASE dynamo;

MySQL – Create Table

The process and command for creating a table in MySql are similar to that for a database. You will need to make decisions about data types and key fields. Detailed information on creating tables is available at W3Schools/Create Table.

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:

Turtle

Python Turtle is based on the Logo Programming Language that has been used as a popular way of teaching children programming for many years.  

Zumo Motors

The Zumo Shield libraries provide basic motor operation consisting of PWM speed control and direction.  

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.