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.

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.

Who wants to produce AI produced cartoon strips

Question: How easy is it produce a comic/cartoon using genetative AI? Let's start with  using ChatGPT4o to produce cartoons. The idea wa...