Wednesday 24 June 2020

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.

·       Look at example of what happens when the junkbot and the rock met. 

M      Making decisions


·       Adding key press to control the code to guide the junkbot around.

·       Extend your solution


 

Activity 1: Reminder of the blocks we used previously? https://computingnorthampton.blogspot.com/2020/05/junkbots-school-outreach-1.html


This means when the green flag is pressed do whatever follows.

 

 

 


This means place our robot (go to block) to point on the screen roughly in the centre of the screen.

 

Do you want a challenge: What do think would happen if instead 0 and 0 in the white spaces in the go to block, we put in 50 and 50? Have a guess.

 

 

 

This means stop the scratch program for 1 second and then carry on.

 

 

 

We can use this block to move the robot 50 steps on the screen in the direction it is facing.

 



We can use this block to turn the robot to the right 45 degrees.

 


We are also going to look at two more ‘things’ today: one new block and a new type of blocks to make our programming easier – the control blocks.

 

 


We can use this block to change the direction the robot faces.

 

 


When we click on the control button at the side we see several more blocks we can use.

 

One of these we have played with before the wait block.

 

The other two we are going to use today in later activities.

 

When we want to repeat a combination of blocks so many times, we can use the middle block and then change the 10 to the number of times we want to repeat.

 

If we want it repeat something forever (or until we stop the program with the red button) we can use the last block.

 

 



Sometimes we want to change what the program does when something happens.

 

We will look at three types of instructions

-     If this ‘thing’ happens then do this.

-     If this ‘thing’ happens then do this else to this other thing

-     When a key is pressed do this.

 

  

 


Activity 2: Have a go at guessing what it is going to do?

 

Follow this link to a new Scratch project https://scratch.mit.edu/projects/405642711

 

 

Challenge 1: Press the green flag and see what it does.  THEN press the green flag and see what it does.

Tell others what you saw it do?

 

Challenge 2: Now go in the Scratch code for the rock (it should look like the scratch program shown next to this).

- describe what you think this does?

- tell others why do you think the if block is inside a forever block?

 

 

 

 

Activity 3: Modify and Make

 

·       Staying with the same scratch code you might have noticed that the junkbot doesn’t always hit the rock.

·       We are going change this so we can guide the junkbot to hit the rocks.

·       Go to the code for the junkbot/robot/rcx.

·       Challenge 3: Add instructions to move the junkbot by pressing the arrow keys. In the picture you can see two events blocks one group of blocks says what happens when the up key is pressed then other when the right key is pressed.

·       Add blocks to make the down and left keys move the junkbot down or left.

 

 

 

 

 

 


 

 

 

 

 

Activity 4: Modify and make play

 

·       Lets get it to add more blocks either using the program you have developed or https://scratch.mit.edu/projects/405650433

·       Go to the stage code you will see a block saying create clone of Rocks every time this block is used a new rock is added to the screen.

·       Challenge 4: Can you change the code so 20 rocks are put on the screen and now create a game where you have to hit every rock.

·       Challenge 5 – looking at other scratch examples (for example https://projects.raspberrypi.org/en/projects/ghostbusters/4) could you add a scoring system to this game.

 

 

 

 

 

 All three activities are available on Issu.com




All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruon

If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Monday 1 June 2020

10 most viewed Junkbot posts in May 2020

Follow b


If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Friday 22 May 2020

Junkbots: Move the robot

3 MINUTE READ

Junkbots session 1: Move the robot

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! Guess what the routine does. Run the routine see if it does as we guessed. Consider what it did and if it is different to what we thought it was going to do. Change the routine a little bit to do another task.

Activity 1: What blocks are we using?

This means when the green flag is pressed do whatever follows.

This means place our robot (go to block) to point on the screen roughly in the centre of the screen.

Do you want a challenge: What do think would happen if instead 0 and 0 in the white spaces in the go to block, we put in 50 and 50? Have a guess.

This means stop the scratch program for 1 second and the carry on.

We can use this block to move the robot 50 steps on the screen in the

direction it is facing.

Do you want a challenge: How do you think we could get the robot to move 100 steps? Have a guess..

We can use this block to turn the robot to the right 45 degrees.

Do you want a challenge: How do you think we could get the robot to move 90 degrees to the right? Have a guess.

Activity 2: Have a go at guessing what it is going to do?

Using what you have learnt in Activity 1.

Let us look at this block of programming.

What do you think it is going to do? If you have someone helping you tell them what you think it does.

If you don’t get it exactly right, it is more important to have a guess.

Activity 3: Try it for yourself

Now go to the weblink: https://scratch.mit.edu/projects/3 84342734 You should see something that looks like figure 1 Click on the box at the top of the screen that says see inside. You should a screen similar to Figure 2 Now press the green flag it should now perform a little dance.

Questions

Does the robot work the way you thought it would from Activity 2? If it did move the way you thought– great! If it didn’t move the way thought still good. What was different?

Figure 1

Figure 2



Activity 4: Change it a bit

Save your work from Activity 3 by going to the top of the screen: find file, click on it and the click on Save to your computer. Then press the save button. Now change the code so that the robot moves in a square. Hint: We need to move in a straight line and then turn 90 degrees several times.

Figure 3

Questions

Does the robot work the way you thought it would? If it did move the way you thought– great! Can you make it move in a rectangle where two sides are longer than the other two? If it didn’t move the way thought still good. What was different?

Activity 5: Try it for yourself

Save your work from Activity 4. Now produce a dance routine for the robot. It must include moving forward and at least three turns.



Figure 4

Figure 5

You could also try adding in  Making it move backwards (negative number in the move block)  Turning left  

This story is from:


If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Junkbots two - move the robot

from Junkbots two - move the robot
by Scott Turner

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. Challenge to get around the rock. Challenge to do the same thing but by repeating actions Extend your solution

Activity 1: Reminder of the blocks we used previously?

This means when the green flag is pressed do whatever follows.


This means place our robot (go to block) to point on the screen roughly in the centre of the screen.


Do you want a challenge: What do think would happen if instead 0 and 0 in the white spaces in the go to block, we put in 50 and 50? Have a guess.



This means stop the scratch program for 1 second and the carry on.



We can use this block to move the robot 50 steps on the screen in the direction it is facing.

Do you want a challenge: How do you think we could get the robot to move 100 steps? Have a guess.



We can use this block to turn the robot to the right 45 degrees.

Do you want a challenge: How do you think we could get the robot to move 90 degrees to the right? Have a guess.

We are also going to look at two more ‘things’ today: one new block and a new type of blocks to make our programming easier – the control blocks.



We can use this block to change the direction the robot faces.



When we click on the control button at the side we see several more blocks we can use.

One of these we have played with before the wait block.

The other two we are going to use today in later activities.

When we want to repeat a combination of blocks so many times, we can use the middle block and then change the 10 to the number of times we want to repeat.

If we want it repeat something forever (or until we stop the program with the red button) we can use the last block.



Activity 2: Have a go at guessing what it is going to do?

Follow this link to a new Scratch project https://bit.ly/ScratchJunkbot2

Challenge 1: Can you describe using the chat what you see it do?

Challenge 2: Can you rewrite the routine so when you press the green flag it hits the rock? What happens when it hits the rock share on the chat? Can you do this using less than seven blocks?

Challenge 3: Rewrite the routine so when we press the green flag it goes around the rock in a square. Hints: You did a similar task last week so please feel free use what you have done before. You might have to change the starting position of the robot. It is worth putting the wait blocks in to help you see it in action.

Activity 3: Modify and Make

Now go to the weblink: https://bit.ly/Junkbot3 Press the green flag and see what it does. Challenge 4: Using the chat describing what it did, please include when do you think it will stop? Challenge 5: How can we change this so that it goes around the rock twice?

Activity 4: Modify and make play

Challenge 6: Try and change what you did in Activity 3 so that the robot goes around the block in a different shape Challenge 7: The really tough challenge. How to we get the robot to move in a figure 8? It must not hit the rock. Have a go yourself and if you want to see one possible answer (there are more than one way to do this) go to https://scratch.mit.edu/projects/398164007/

Questions

Does the robot work the way you thought it would? If it did move the way you thought– great! Can you make it move in a rectangle where two sides are longer than the other two? If it didn’t move the way thought still good. What was different?If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Saturday 2 May 2020

A series of Cool Videos from "Make with Me"

I came across a series of very cool videos from a YouTubber "Make with Me", that fit very well with the ethos of the Junkbots project and this blog. Here are a few of them:








Worth subscribing to their channel: https://www.youtube.com/channel/UCZvmzmENvrnMmCd8ZAqcA2w


c



For plans and resources from Junkbot project go to https://junkbots.blogspot.com/2012/06/junkbot-project-case-study-and-session.html



If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Wednesday 27 February 2019

Big Bang for Junkbots

In tweets (Big Bang Northamptonshire https://www.learnbydesign.co.uk/event/big-bang-northants-2019/ )


















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

Wednesday 2 January 2019

5 Most viewed posts on the junkbots blog in 2018

  • A new direction has been developed for the junkbot project ( http://junkbots.blogspot.co.uk/ ) ; previously Raspberry Pis have been used to...
  • Over the last eight years I have been working (off and on) on a project, junkbots ( http://junkbots.blogspot.co.uk/2010/01/introduction.html...
  • Junkbots in the Big Bang Northants #TBBNorthants on 28th February 2018 at Silverstone. This event is part of the  The Big Bang Near Me progr...
  • This is a two-part series on a new Junkbots project. In this part building the junkbot itself is discussed. In the second part controllin...
  • A new blog has been launched by Scott Turner  looking at Computational Thinking ( http://compuationalthinking.blogspot.co.uk/  - the typo ...


If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk