Skip to main content

Posts

Showing posts with the label python

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):    ...

Junkbot Poster - PyCon UK 2016, 17th September 2016

Poster presented at PyCon UK 2016, 17th September 2016. Pyconuk16  junkbots   from  Scott Turner DOI:  10.13140/RG.2.2.28682.67520 For more details on the three builds: Raspberry Pi based:  http:// bit.ly /2c87qex Basic Micro:Bit build:  http:// bit.ly /2cmJo0B Radio Control Micro:Bit  Junkbot :  http:// bit.ly /2cMHpDa 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. Twitter  @scottturneruon If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Do it yourself: 'Radio' Controlled Micro:Bit Junkbot

I In an earlier  post , I showed how you could build a Micro:Bit controlled Junkbot. In this post I want to show a modification to it, to use one Micro:Bit to control the junkbot controlled by another Micro:Bit. A nice feature of the Micro:Bit using micropython, is it can send and receive simple messages via radio - so here is my take on it. The first problem is the Python editor available on  https://www.microbit.co.uk/  does not seem to work with the radio API. One solution to this is to change to the  mu  editor. Two pieces of code are needed. Sending Code for the 'remote' control: Essentially it is set up to send two messages, via the built-in radio module,  spinl  or  spinr  depending on which button is pressed. import radio from microbit import button_a, button_b radio.on() while True:    if button_a.is_pressed():        radio.send('spinl')    if button_...

Controlling a junkbot with a Micro:bit

A new direction has been developed for the junkbot project ( http://junkbots.blogspot.co.uk/ ) ; previously Raspberry Pis have been used to control the  junkbot’s  movement ( http://robotsandphysicalcomputing.blogspot.co.uk/2016/01/python-junkbot.html )  – but what about the recently released Micro:Bits; can it be used to control a junkbot? Matthew Hole, a student from Wrenn Academy, Northamptonshire ; has been investigating this idea whilst on a Nuffield Research Placement ( http://www.nuffieldfoundation.org/nuffield-research-placements)  working with Dr Scott Turner, University of Northampton. The project was to look into developing junkbots controlled using a Micro:bit and also to produce some materials for schools to use with or without outside assistance. What is a Junkbot? For this project, it is a moving ‘bot’ made from waste materials, combined with an electric motor and a programmable device (in this case a Micro:Bit) to control ...

Raspberry Pi - Python Junkbot using ExplorerHat Pro

Junkbots ( http://junkbots.blogspot.co.uk/ ) are based around using  materials such as drink's cans, broken propellors and motors to produce something that moves by vibration. Previous designs be found at: Raspberry Pi Controlled Junkbots Junkbots blog The latest tweak to the Raspberry Pi based Junkbot design is to use the combination of Python and Pimoroni's  Explorer HAT PRO  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(durati...

Junkbot project evolves:1. The idea

Taken from:  http://computingnorthampton.blogspot.co.uk/2014/07/physical-computing-junkbots-with-brain.html Figure 1 A new stage for the Junkbots project ( http://junkbots.blogspot.co.uk/  ) starts this week. Up to this point the junk bot building has largely being about building a moving (or drawing) 'bot' moved by vibration - limited control, but fun. This week, A  Nuffield funded bursary studen t starts working on investigating whether LEGO NXT or Raspberry Pi based solutions can be incorporated with the bot to add some control of the movement (still by vibration). Idea One  Is to add a LEGO NXT brick, plus motors that are made to vibrate, to a junkbot similar to one shown in figure 1. The motor and broken propeller combination being replaced with the NXT brick and LEGO motor. A good potential feature is it a self-contained unit with power and control together, as well as being potentially fairly simple to set-up. Idea Two Is to do a similar approach as...