Short Project Description


Short Project Description


The concept of graphical programming enables teenagers and even younger children with creative access to computers. Scratch, a project of the Lifelong Kindergarten Group at the MIT Media Lab, provides not only the tool, but creates also a very inspiring environment for children, teachers and parents alike.
But sometimes creativity goes beyond creating "only" a program - physical interaction, tangible results become essential.

On the other hand, the Arduino project is quite famous and I'm impressed how well documented these microcontroller boards are, how easy they are to come by and how many slightly modified clones are around - all of them (Arduinos and clones) with a reasonable price tag. So it seems a good idea bringing Scratch and Arduino together.

This blog describes the advances step by step of setting up a robot controlled by an Arduino and easily programmed through a graphical enviroment. This project might be interesting to hobbyists, teachers, educators and parents (like me).

To allow for a maximum of creativity and flexibility the robot will use LEGO Technic / Education as the mechanical robotics platform.

Wednesday 19 February 2014

Controlling an Arduino by S4A using Bluetooth

Connecting the ITeaduino BT seems quite straight forward:
  1. configure Bluetooth transceiver on ITeaduino BT
  2. ensure Bluetooth on the connecting computer (i.e. laptop in our case) is configured correctly
  3. initiate Bluetooth device pairing between computer and ITeaduino BT
  4. configure S4A properly
  5. test connection running a program - e.g. make LED blink on Arduino's D13
But as always: The devil's in details

The following links prooved helpful to me:

 1. Configure Bluetooth transceiver on ITeaduino BT

After having tested the ITeaduino BT working in "normal" cable connection, I started configuring its Bluetooth transceiver. As described in Benjamin Bellamy's blog I set the Arduino clone to transceiver programming mode. How to configure the used HC-05 module can be found on the first link provided above.
In configuring the transceiver module I used the parameters given in ITead Studio's blog:
  • AT+ORGL (Restore the default state)
  • AT+ROLE=0 (Configure the HC-05 as slave)
  • AT+POLAR=1,0 (The LED will on when the output of PIO8 is high. And it indicates connecting successfully when the output of PIO9 is low.)
  • AT+UART=57600,0,0 (Set baud rate to 57600, one stop bit and no parity bit)
  • AT+INIT (Initializing SPP library)
As a terminal program I used AccessPort - but it should also work with the Arduino SerialMonitor, which I ruled out as it is by far not as comfortable as AccessPort.

N.B. I'm using the Arduino 1.5.4 r2 development tool - but I have NOT exchanged the “rxtxserial.dll” file as suggested. If I'm remembering correctly, I ran into problems with doing that...

I've also played with adding the the 1uF capacitor to the ITeaduino BT as described - but finally removed it again as I didn't want to programm the Arduino via Bluetooth (YES, this really works!!!)

2. Configure Bluetooth on the connecting computer

This seems to be a no-brainer. But with me it turned out to be a bit of a challenge to get the correct Bluetooth driver for Windows 8. Make sure it works correctly with another device e.g. a smartphone. And... at least for me, this took a considerable amount of time...

3. Initiate Bluetooth device pairing

 This is really straight forward: initiate Bluetooth pairing as described in ITead Studio's blog or as you're used with any other device. Don't forget the virtual serial port you're using for your Arduino...

4. Configure S4A properly

Using S4A 1.5 you have to program your Arduino with thw according firmware (S4AFirmware15.ino). To be shure, you should do this the "normal" way with an USB cable. Once downloaded to the Arduino I encountered S4A couldn't detect the Arduino, on the serial monitor you could see the Arduino send some gibberish.
A crosscheck with the S4A firmware helped on: at the very beginning of this sketch a data rate of 38400 baud is configured, whereas I've set the Arduino's Bluetooth transceiver to 57600 baud (see above). I decided to change the baud rate in the S4A firmware sketch instead of reprogramming the Bluetooth transceiver. And - heureka - S4A detects the ITeaduino BT via Bluetooth.

5. Test your connection from S4A

Once S4A detects your Arduino clone, you'll find it is working properly with your first Scratch program...

Mission accomplished.

Monday 17 February 2014

Alive - Lego Robot on the Run

The most important message at the very beginning: This project is very alive - even without me finding time to blog...

My son is really happy programming his Arduino (in fact an Arduinio clone: ITeaduino BT as described in my blog from October 2013) with S4A.

At the very beginning, he worked through the excellent documentation Elisava Workshop Materials 2011 provided from Citilab. This gave him the knowledge and the confidence to start setting up his "ArduBot" entirely built from the LEGO Technic set 9390 and some special parts, I've already described.

ArduBot - from the side
A permanent bluetooth connection allows "remote controlling" of the robot's actuators and sensors with S4A. This really works fine - and I really dont understand, why this way of connecting to an Arduino is not much more widespread.
Modified microservos to act as continuous rotation servos move ArduBot, IR sensors prevent it from collisions, whereas an ultrasonic sensor (like the famous PING!) provide a long distance detection of obstacles (not mounted on the picture above) and small IR sensors allow the implementation of a "line follower".

ArduBot - from front angle
What we learnt from the modification of our microservos is a different story, enough to fill another blog as well as construction details of our new tech toy...