Showing posts with label lego. Show all posts
Showing posts with label lego. Show all posts

Tuesday 1 December 2015

Controlling junk with LEGO

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. A Nuffield funded bursary student, Hayden Tetley,  has being working within staff from the University of Northampton on whether LEGO 8547: Mindstorms NXT 2.0: Robot 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, to move a junkbot similar.The motor and broken propeller combination in the earlier junkbots is 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. This is the focus of this post. 

Here are some videos showing idea one in action using LEGO motors, brick and the software that comes with the LEGO 8547: Mindstorms NXT 2.0: Robot :





For more information on how this was done go to: http://legojunkbots.weebly.com/uploads/3/7/2/2/37227791/nuffield_nxt_mindstorms.docx or http://legojunkbots.weebly.com/

Idea Two

Is to do a similar approach as idea one but keep the motor and broken propeller combination but control the motors via a Raspberry Pi. This is discussed in another post http://robotsandphysicalcomputing.blogspot.co.uk/2015/07/raspberry-pi-controlled-robot-from-junk.html

Details of the work will be published on the Junkbots Blog (htttp://junkbots.blogspot.co.uk/ ) as the project progresses.




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.

Sunday 22 November 2015

Robot Software

In the previous blog posts for this 'series' "It is a good time...." 


  • Post 1 looked at the hardware unpinning some of this positive rise in robots;
  • Post 2 looked at social robots;
  • Post 3 looked at a collection of small robots;
  • Post 4 looked at further examples of small robots

Robots, such as the forthcoming Buddy and JIBO, will be based some established open sourceand other technologies. Jibo will be based around various technologies including Electron and JavaScript (for more details see: http://blog.jibo.com/2015/07/29/jibo-making-development-readily-accessible-to-all-developers/). Buddy is expected to be developed around tools for Unity3d, Arduino and OpenCV, and support Python, C++, C#, Java and JavaScript (for more details see http://www.roboticstrends.com/article/customize_your_buddy_companion_robot_with_this_software_development_kit). This post continues with some of the software being used with the smaller robots. 

A number of these robots are being programmed via Scratch or Scratch-like environments for example the OhBot (http://ohbot.weebly.com/) or Crumblebot (http://robotsandphysicalcomputing.blogspot.co.uk/2015/07/edge-following-crumblebot.html). Arduino based systems, discussed in Post 1, form the basis of a relatively large number of robots. Some other ways are discussed below.  



LeJOS
LeJOS (http://www.lejos.org/index.php) is an alternative way to program the LEGO Mindstorms Robotic Systems including the oldest RCX to the latest EV3. What it does is allow the robots to be programmed in Java by putting a small virtual machine on the controller/Brick. 

Some examples of it in use or being discussed can be found at:


A relate tool that use LeJOS as one of its underpinning technologies is Enchanting. A Scratch-like way to program LEGO robot based around Mindstorm NXT and EV3. For more details on this go to: http://enchanting.robotclub.ab.ca/tiki-index.php



Tickle


Tickle (https://tickleapp.com/en-us/) is one of my favourite of the physiclal computing programming tools at the moment. It is designed for program a quite range of devices using a 'Blockly-like' graphical programming approach. The Sphero range of robots and some of the Parrot Drone are supported.


When  I recently bought a Parrot Rolling Spider Mini-drone, I used the Tickle App (https://tickleapp.com/en-us/)  to control it. This was the first time I have actual programmed something that flies; the fact you are controlling  something you able to move in all directions is very engaging.

On the left is an example used; essentially lift off, repeatedly move forward, turn and in the end land.

As well as drones, the Sphero robots can be controlled using Tickle (that is how I first came across it). This does also include the entertaining and popular Sphero Star Wars BB-8. Which is well worth a play, if you get an opportunity. Dash and Dot (see http://robotsandphysicalcomputing.blogspot.co.uk/2015/07/cutest-computational-thinking-in-world.html for more details)  are also controllable through Tickle was well. 


Also a number of devices such as Punch Through Design's Arduino-based LightBlue Bean (https://punchthrough.com/bean-teaser), a Bluetooth Low Energy (BLE) microcontroller are supported- I have get to play with this one though.

I like the Tickle App because of its easy of use but mainly for the company's expansion of the range of devices supported.




Feedback
Please add comments with other software choices.



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. The author does not and can not take responsible for any harm cause by the software discussed - if you are unsure do not use the software.

Friday 31 July 2015

Lego Mindstorms – Sentry Robots


Sameer Kumar Shrestha, Northampton

The report presents the dissertation on title Prototype of Sentry Robots for Advanced Security which includes the use of LEGO robots showing interaction between each other with the help of wireless communication medium in Bluetooth. The purpose of the work is to build a communication between multiple LEGO robots using the wireless technology. For this task, the NXT version of LEGO Mindstorms has been selected. It is because there is need of complex communication which is possible through wireless medium such as Bluetooth and also a suitable processing device for the proposed task which is present in the LEGO Mindstorms NXT. The report has also focused on the background information about the NXT system and its great flexibility with LeJOS NXJ as the programming platform. The outcome is the implementation of developed work with the use LEGO Mindstorms NXT and the LeJOS NXJ as programming platform. The task was approached with one LEGO NXT robot maintaining the distance between the object in the environment and searching the object by rotating in case of lost. After the completion of the first task, the next task was to study the communication behavior of multiple robots communicating with each other to fulfill the same job. For this, three NXT robots were taken and programmed in such a way that they form the shape of triangle and keep tracking the object.  All three of them send and wait for the information from each other and process this information to produce a suitable output, i.e. to respond to the action from each other. Thus, it was found that the implementation of several processes to multiple LEGO based communication had faults, due to the technical hitches with the communication technology and limitations of the NXT systems.





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 July 2015

Lego Robot and Neural Networks

An overview of using Lego RCX  robots for teaching neural networks present at workshop in 2011.



The video below shows the robot trying out sets of weights for two neurones, until a set of weights are found that enable the robot to go around the circle.





As a part of a set of tools I have found the following useful for teaching the principles of simple neurones.

 Example code:

import josx.platform.rcx.*;

public class annlf{
 public static void main(String[] args)
 {
  int w[][] ={//put weights here};
  int o[]={1,1};
  int s1,s2,res1,res2;
  int sensor1=0,sensor2=0;
  robot_1 tom=new robot_1();
  Sensor.S1.activate();
  Sensor.S3.activate();
  for(;;){
   sensor1=Sensor.S1.readValue();
   sensor2=Sensor.S3.readValue();
   LCD.showNumber(sensor1);
   if (sensor1<42)
    s1=1;
   else
    s1=0;
   if (sensor2<42)
    s2=1;
   else
    s2=0;
   res1=w[0][1]*s1+w[0][2]*s2+w[0][0];
   if (res1>=0)
    o[0]=1;
   else
    o[0]=0;
   res2=w[1][1]*s1+w[1][2]*s2+w[1][0];
   if (res2>=0)
    o[1]=1;
   else
    o[1]=0;
   if ((o[0]==1)&&(o[1]==1))
    tom.forward1(10);
   if ((o[0]==0)&&(o[1]==0))
    tom.backward1(20);
   if ((o[0]==1)&&(o[1]==0))
    tom.tlturn(20);
   if ((o[0]==0)&&(o[1]==1))
    tom.trturn(20);
   LCD.refresh();
  }
 }
}

The example code uses two neurones to produce a line follower. The nice thing about this though is it easy to adapted this for a single neuron or multiple neuron tasks. For more on this some examples can be found here.
The above approaches used the Mindstorms RCX robots but it can equally be done with the newer NXT robots


 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.

ChatGPT, Data Scientist - fitting it a bit

This is a second post about using ChatGPT to do some data analysis. In the first looked at using it to some basic statistics  https://robots...