Skip to main content

Huxlow Pt 2: Lego Robots


 The second half (programming lego robots) on the junkbots project has been carried out at Huxlow Science College on 28th February 2011.

At the start of the day most of the students had not previously programmed a robot or (knowingly) a computer.

The first task was to get the robot to collect some rubbish and push it over a line and then move back to the another line. All groups programmed the robot to do this and some groups add a sweeper to the front of the robot to push several items at once across the line.

The second task was to get the robot to collect the rubbish this time, but without adding any attachments to the front of the robot. Several groups successfully did this, by programming the robot to follow a path that collected the rubbish (drinks cans) and put them behind the line.

The third and fourth tasks involved the use of a sensor:
-To build the robot that did not move unless there was a can in front of the robot.
-To build a robot that went around the can when it detected it.

Some of these students went from never programming to programming robots that could react to objects all in one day.

Feedback from this group for the junkbots activity (figure 1)  and the lego robot (figure 2) activities was generally good. Thank you to all those who took part.

Figure 1: Junkbot activity (Day 1)



Figure 2: Lego Robots (Day 2)

Comments

Popular posts from this blog

junkbots 3 - bring it all together

Junkbots session 3: Move the robot but now there are rocks in the way.  This is the last of three posts - Introduction and sequence - Loops and just having fun - This one: Making decisions and bringing it all together. What is the Junkbots project The Junkbots project has been running for a number of years as an initiative to bring sustainability, computing and engineering together by building bots out of junk; details of the project can be found at.  https://junkbots.blogspot.com/  . Junkbots is an extension of the Research into the teaching problem-solving going on at the University of Northampton please feel to visit  https://computingnorthampton.blogspot.com/2019/01/problem-solving-research-outputs-and.html  for more details.   What are we going to do? ·         Play with a Scratch robot on the screen! ·         Build on the routines from the previous session. ·    ...

Junkbot Raspberry Pi: 3 How to do it

Figure 1 In previous posts I start looked at using ScratchGPIO to control a junkbot  ( http://junkbots.blogspot.com/2014/08/junkbot-pi-1-scratchgpio.html ) and showed a Pi controlled junkbot briefly in action ( http://junkbots.blogspot.co.uk/2014/08/junkbot-raspberry-pi-2-raspberry-pi.html ). In this post I aim to discuss - Choice of motor controller card - Provide an example of a drawing junkbot controlled through Scratch and Raspberrry Pi Choice of interface/Controller card The card choosen was the 4Tronix PiRoCon card  ( http://4tronix.co.uk/store/index.php?rt=product/product&product_id=182 ). Selected for four reasons - Price is reasonable (in my opinion). - Fits straight onto the Pi through the GPIO - no extra cables needed. - ScratchGPIO has it as an addon so it makes programming it even easier (see http://cymplecy.wordpress.com/2013/10/31/pirocon-from-4tronix/ ). - Others are using it for robot projects. Use it is quite easy plug the board directl...

Controlling 'junk' robot - three options

Three approaches to control it will be considered here: - via Raspberry Pi; - via Micro:Bit -via Crumble controller 1. Raspberry Pi based In this Raspberry Pi based Junkbot design a combination of Python and Pimoroni's  Explorer HAT PRO  are used to control it. Explorer HAT Pro is a good choice, it can control two motors with a library provided to simplify the programming. For this the Junkbot was the one shown above: a drinks can, pen, LEGO bits, motor and broken propellor. Before the Explorer HAT can be used the library needs to be installed via the Terminal and the instructions below curl get.pimoroni.com/explorerhat | bash Python code to control the junkbot is shown below. import explorerhat from time import sleep def spin1(duration):     explorerhat.motor.one.forward(100)     sleep(duration)     explorerhat.motor.one.stop() def spin2(duration):    ...