Wednesday 25 May 2016

Drone at Code Club





Recently i have been taking a Parrot minedrone and the Tickle App (https://tickleapp.com/en-us/) to Code Club session, as an extra activity.

For those there actually programmed something that flies and it is quite engaging - having something you are controlling being able to move in all directions.


I wish the mini-drone had a little bit more battery time (I would suggest getting an extra battery). Combining with the drone and the Tickle App does add something to the experience, rather than just control it directly (though that is fun). The noise is also not to everyone's taste so it has to be used carefully in that context, but also from a safety point of view.



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 16 May 2016

First Try with 7bot Robot Arm

In a previous post (http://robotsandphysicalcomputing.blogspot.co.uk/2016/05/playing-7bot-robot-arm.html) I discussed starting to set up the 7bot robot arm (https://www.kickstarter.com/projects/1128055363/7bot-a-powerful-desktop-robot-arm-for-future-inven) . I have still to set up the gripper.

This post document my first tentative steps with playing with it. The code below was used to try and get my head around the positioning of the arm - which servo does what (a good guide for this has been provide by the company online) and what the changing angle on the servos actual does. Essentially the code puts the arm in a starting position and varies the angles from there in usually in 15 or 30 degree increments over seven positions.

#include <Servo.h>
#include <DueFlashStorage.h>
#include <Arm7Bot.h>
Arm7Bot Arm;
void setup() {
  // initial 7Bot Arm
  Arm.initialMove();
}

void loop() {
  // set motor[0] speed to 100
  Arm.maxSpeed[0] = 30;
    double angles_0[SERVO_NUM] =  {0, 100, 90, 0, 90, 90, 75};
  Arm.move(angles_0);
  // Move to pose 1
  double angles_1[SERVO_NUM] =  {0, 100, 0, 0, 90, 90, 75};
  Arm.move(angles_1);
  // Move to pose 2
  double angles_2[SERVO_NUM] =  {30, 110, 15, 0, 90, 90, 75};
  Arm.move(angles_2);
  // Move to pose 3
  double angles_3[SERVO_NUM] =  {60, 120, 30, 0, 90, 90, 75};
  Arm.move(angles_3);
  // Move to pose 4
  double angles_4[SERVO_NUM] =  {90, 130, 45, 0, 90, 90, 75};
  Arm.move(angles_4);
   // Move to pose 5
  double angles_5[SERVO_NUM] =  {120, 140, 60, 0, 90, 90, 75};
  Arm.move(angles_5);
  // Move to pose 6
  double angles_6[SERVO_NUM] =  {150, 150, 75, 0, 90, 90, 75};
  Arm.move(angles_6);
  
}   

Video below shows the routine in action.



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 4 May 2016

Playing with 7bot robot arm

The 7bot is a recent kickstarter project https://www.kickstarter.com/projects/1128055363/7bot-a-powerful-desktop-robot-arm-for-future-inven from 7bot. A metal robot arm based around Arduino Due (https://www.arduino.cc/en/Guide/ArduinoDue ). Development of the software, at the time of writing, is still ongoing but looks interesting and already on the comments page of the site, user's have started posted their code. 




Had to install the following software and put the un-zipped files in the library folder of the Arduino folder.

https://github.com/7Bot
https://github.com/sebnil/DueFlashStorage 

Some useful information of setting up using the Arduino Due is available at https://www.arduino.cc/en/Guide/ArduinoDue and is definitely worth a read - it helped me setting it up.


At the moment I have just used the examples from the GitHub site and example is shown in the video below. This looks like an exciting little arm and hopefully there will be more on this blog about it.




I would be interested in hearing from others who have been playing with this arm.



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.

Tuesday 19 April 2016

Minecraft, jam and history in the making

Taken from: http://www.northampton.ac.uk/news/minecraft-jam-and-history-in-the-making/


Pi canva
History was made on Saturday as the University of Northampton hosted Northamptonshire’s first-ever Raspberry Jam.
Raspberry Jams see those with an interest in the affordable – and tiny –Raspberry Pi computer get together to share knowledge, learn new things and meet other enthusiasts.
More than 30 people of all ages attended the county’s inaugural Jam at Avenue Campus, which was organised by the University’s Associate Professor in Computing and Immersive Technologies, Dr Scott Turner.
He said: “The Jam was a real success, with a wide mixture of people including fairly notable experts; those who have a Pi, but aren’t quite sure what to do with it and complete novices.
“It was great to see people who had some sort of Pi-related query have their questions answered, and others showing off what they have managed to get their Pi to do.
“It really helped to inspire the novices to get more involved in the Raspberry Pi, which will ultimately help them develop their coding skills.”
Computing and Science teacher Steve Foster, from Wollaston School, led a session on the popular Minecraft game, and was ably assisted by five of his Year 10 pupils.
One of the pupils, Ellie, said: “One of the groups had a problem with their coding and I managed to solve it for them. I love the challenges a Raspberry Pi can give you, and when you are able to solve the problem it’s really cool.”
The University is committed to making a positive social impact on the people of Northamptonshire and has set itself four ambitious challenges to meet by 2020.
One of these ‘Changemaker+ Challenges’ is to make Northamptonshire the best county in the UK for children and young people to flourish and learn – something the Raspberry Jam has contributed to.


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.

Tuesday 12 April 2016

Dancing bot on a Microbit

In a earlier post on using micro:bit (Playing with microbit emulator-dancing bot)  a simple dancing robot image (using the 5x 5 grid was created). 
A dancing bot - 3x3 box for the body, with two legs. 

Thanks to a loan of a Micro:Bit from Lancaster University I can experiment with an actual micro:bit ( )











Experiment  1 - Using the buttons

So the functions for the idea were:


  • Button A - Move to the left and then back to the starting position;
  • Button B - Move to the right and then back to the starting position;
  • Buttons A+B - Jump up and then back to the starting position;
  • Shake - 'Crouches' and then back to the starting position



On the Microbit









Experiment 2- To add left and right tilting to it.
So if the micro:bit is tilted to the right the 'bot'  moves to the right, and the same for the left.

The tilting operation here is essentially - when the x on the accelerometer is less than zero move the 'bot' to the left and when it greater than zero go to the right.

Video showing it in action





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 11 April 2016

Pimoroni Flotilla first play with Python.



The Mega Treasure Chest Flotilla set from Pimoroni, was kickstarter project that got a lot of people interested. A nice package - a hub for a collection of devices such as light sensors, barometer, temperature, switches, motors and many more; all linked to a Raspberry Pi. The kit is shown in the image to the left.



A Python API exist for this system. Instructions on how to set up the Flotilla to work with Python can be found at http://flotil.la/start/ .

I wanted to play with switching the Rainbow (A set of RGB LEDs) outputs to Red, Blue and Green by pressing either 2,3, or 4 on the Touch Sensor as in the images.





Using the mini-kit example from https://github.com/pimoroni/flotilla-python/blob/master/examples/mini-kit.py as the basis, produced a simple system that uses the Touch module and its buttons 2,3 and 4 to change the Rainbow; the code is shown below and ran on a Raspberry Pi 3 using Python 3.


import colorsys
import flotilla
import time

client= flotilla.Client(
    requires={
        'one':flotilla.Rainbow,
        'two':flotilla.Touch
    })

def module_changed(channel,module):
    rainbow=client.first(flotilla.Rainbow)
    if module.is_a(flotilla.Touch):
        if module.one:
            rainbow.set_pixel(0,255,0).update()
        else:
            rainbow.set_pixel(0,0,0).update()

while not client.ready:
    pass

touch=client.first(flotilla.Touch)
rainbow=client.first(flotilla.Rainbow)
hue=0
lights_on= True

try:
    while True:
        if touch.one:
            lights_on = not lights_on
        if touch.two:
            rainbow.set_all(255,0,0).update()
        if touch.three:
            rainbow.set_all(0,255,0).update()
        if touch.four:
            rainbow.set_all(0,0,255).update()

        time.sleep(0.5)

except KeyboardInterrupt:
    client.stop()


The video below shows the system in action.




I look forward to playing with it a bit more and I would love to hear what others are doing with the Flotilla.


An other example of Python and Flotilla in action can be seen at 

 http://home.uktechreviews.com/Raspberry/Pi%20blog/files/flotilla1.html 

Related links

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.

Saturday 9 April 2016

Experiences with Raspberry Pi Touch Screen

Well for once I am not going to be talking about robots, but my experience in setting up a Raspberry Pi touch screen - this is not a how to guide, a couple links to those are included in the post, but my experience of setting one up. 

So the I bought the Raspberry Pi Touch Screen from Pimoroni and along with the stand/frame for it.

Setting up the LCD frame was simple with the instructions provided and the link at the end of the instructions provide some further help http://learn.pimoroni.com/tutorial/pi-lcd/getting-started-with-raspberry-pi-7-touchscreen-lcd on setting up the screen

A tutorial from The PiHut (https://thepihut.com/blogs/raspberry-pi-tutorials/45295044-raspberry-pi-7-touch-screen-assembly-guide) was very useful on how to connect the screen to the Pi. The blue side  on the white ribbon cable (provided with the screen) used in connecting the two together needs to blue side down towards the LCD (as explained in PiHut tutorial) and facing away from the Pi when connecting to it, which is the bit I was unsure of. Connecting the power via the jumper leads that came with the screen means only a single power supply is need for both the screen and Pi. If you follow the  PiHut tutorial the colours of the jumper leads may needed to be changed but that is not a problem. 

I used Raspbian OS and when power up with a power lead (it needs to output enough current to power both devices) both the Pi and screen came on without any difficulty.  

The touchscreen worked well as a mouse and the single power lead makes the system much more compact.


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