Sunday, 26 June 2016

CodeBug at code club




These little devices provide something different to a code. To see the coding interface go to http://www.codebug.org.uk/ (or see figures 1 and 2) and click on create.



Last two weeks
Week 1 
The code clubbers initially shared machines, playing with the CodeBug environment, practice downloading to the bug, writing a routine to scroll their short message. The challenge was then to develop a routine to have a smiley face and a grumpy face scroll across the screen.


Week 2
All have access to the simulation and code generation on codebug.org.uk but this time they don’t have the CodeBug each, they have complete a challenge and run it on the simulation before get a CodeBug to try it. This week's challenge was to get the smiley and grumpy face from week 1 to be selected via the buttons (A and B) - so it involved a loop and conditional statements. Most of them picked it up very quickly.

Two version were built - I reconstructed the ideas in figures 1 and 2 (the code clubbers often did a better version than mine shown here!).

Figure 1: Simple Scroll
The one shown in Figure 1 works by pressing A -scrolls :-) and B - scrolls :-( . Some spotted that the the 'nose' wasn't quite in the place. Some went and found the build sprite block and used that instead.
Figure 2 - Using the build sprite.




Lessons learnt
  • Give them all access individually to the CodeBug website but not to the physical CodeBug straight away
    • They are often a limited resources
    • There is a great temptation from the code clubbers to focus on download to the actual device when the seem to get more done if the spend more time with website and its simulator first;
    • When they have something interesting to put on the ‘bug’; then they can borrow a bug and try it out.
  • They should do a bit of show and tell.

Related posts
Basic Motor Control using CodeBug
messing around with Codebug




All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Friday, 24 June 2016

Playing with Smurf the Robot

Experimenting with an Aldebaran NAO robot - nicknamed Smurf - to get the robot to deliver a short welcome. The video below show the robot being simulated using the code in figure 1 and then shows the 'Smurf' actually carrying out the routine (the bottom video show this bit without the simulator). The only difference in the code on the simulator and the one running on the actual robot was an extra command was added at the start of the one on the robot to only start when the top of the head is tapped.



figure 1. Choregraphe program for the routine.






All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Monday, 20 June 2016

Basic motor control using CodeBug



A simple transistor circuit is used here to get the CodeBug to control a small motor, turning it on or off.
Drawn using Schemeit (http://www.digikey.co.uk/schemeit/project/

The motor used here was a small cell-phone vibration motor, but it has been tried with other small motors.




Using ‘leg 1’ to switch the motor on or off, +5v comes from the CodeBug PWR connector and GND come from the CodeBug. It can only drive the motor in one direction.

In the code below Button A switches on the motor and Button B switches the motor off.






All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Monday, 13 June 2016

messing around with Codebug




Codebug is great fun, the Blockly programming is more challenging than Scratch but that is ok. 

As a test a Codebug was used to control two glowbugs (see http://www.codebug.org.uk/learn/activity/74/glowbugs-wearables/#step446 for more details on Glowbugs and working with them on the Codebug). 


Routine

Repeat
  Set the  Glowbugs 0 and 1 to yellow;
  Scroll a message across the 5x5 grid saying yellow;
  if button A is pressed
    Set the Glowbugs 0 and 1 to red;
    Scroll a message across the 5x5 saying red;
  if button B is pressed
    Set the Glowbug 0 to blue;
    Scroll a message across the 5x5 saying blue;  






All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Wednesday, 8 June 2016

Teachmeet and robots via tweets











If you'd like to find out more about Computing at the University of Northampton go to: www.computing.northampton.ac.uk. All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated withAll opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Wednesday, 1 June 2016

Robot Arm in School



Santander UK
 recently provided the funding for a project I have want to do for a while; to loan robot arm kits, which are pretty much self-contained, out to schools to see what they come up with. The idea being to provide the kit for a year and the schools taking part write a blog post (or more than one), sharing what they have done.
 
The chosen kit is the CBiS Education robot arm hub because it comes with the robot arm, cables, raspberry pi, etc as well as screen, keyboard and mouse in one go (see the picture above).

The kits should start going out some of the schools next week.



I am grateful to Santander UK for the funding; CBiS Education for their support and advice so far; last but not least the schools who have enthusiastically expressed an interest in taking part.



All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Remote Data Logging with V1 Microbit

In an earlier post  https://robotsandphysicalcomputing.blogspot.com/2024/08/microbit-v1-datalogging.html  a single microbit was used to log ...