Sunday 25 October 2020

Butterfly Life Cycle Scratch Project

This 3-part Scratch tutorial shows how to create a Scratch project to illustrate the life cycle of a butterfly. This project is intended for Life Cycles unit in Stage 2 in NSW Science and technology, but need not be limited to that.

Part 1. This first 9 min 24sec video shows how to setup the resources for a Scratch animation.

 

 

Part 2. This 14 min 54 sec video shows how to take the resources collected in #1 and make them into a simple animation showing the butterfly life cycle.



Part 3. This video tutorial shows how to animate simple movement, change a costume and use repeats

 




Sunday 20 September 2020

Controlling a Robotic Arm with a Microbit

 

Robotic arm

This project uses a Robotic Arm from Jarcar with a custom made Microbit interface, to enable the arm to be controlled by the Microbit.


Coding in MakeCode

This starter project is recommended for primary school students to make the coding easier so students can focus on the algorithms and actions. It provides functions that can be called to run the motors, buzzer and LEDs.

https://makecode.microbit.org/_UgiH2uXFDKma

When the page open, click Edit Code to access the coding page. To use the function blocks, click Advanced and then Functions

Just before each function block you need a time block. To find the time block, click variables and then set time to ...

Here is an example of using a function. When button A is pressed, the time is set to 2000 ms (which is 2 seconds) and motor 2 will move upwards for 2 seconds.




Function

Action

Each action is stopped after the specified time

call m1Open

Opens the jaws of the gripper

call m1Close

Closes the jaws of the gripper

call m2Up

Moves the “wrist” part of the arm upwards

call m2Down

Moves the “wrist” part of the arm downwards

call m3Up

Moves the “elbow” part of the arm upwards

call m3Down

Moves the “elbow” part of the arm downwards

call m4Up

Moves the base part of the arm upwards

call m4Down

Moves the base part of the arm downwards

call m5Right

Rotates the base part of the arm to the right

call m5Left

Rotates the base part of the arm left

call forward

Uses motor 3 and motor 4 together, to move the arm forwards

call backward

Uses motor 3 and motor 4 together, to move the arm backwards

call redLight

Turns on the red LED. (Recommended for the On Start block, to show that the Microbit is on.)

call greenLight

Turns on the green LED.

call searchlight

Turns on the LED on the arm.

call buzzer

Turns on the buzzer. (Note that he music blocks also work and give a wider range of sounds.)



Coding in Javascript or Python

You can use this pin allocation table to plan your algorithm.

Pin Allocations

Micro:bit Pin

Action

Pin setting

O

Buzzer

0 = off, 1 = on or use Music blocks.

1

Red LED

0 = off, 1 = on

2

Green LED

0 = off, 1 = on

3

M1, Gripper

0 = off, 1 = on

4

M1, Gripper

0 = open, 1 = close

6

M2, Wrist

0 = off, 1 = on

7

M2, Wrist

0 = down, 1 = up

8

LED “search light”

0 = off, 1 = on

9

M3, Elbow

0 = off, 1 = on

10

M3, Elbow

0 = down, 1 = up

13

M4, Base motion

0 = off, 1 = on

14

M4, Base motion

0 = down, 1 = up

15

M5, Base rotation

0 = off, 1 = on

16

M5, Base rotation

0 = clock-wise, 1 = counter click-wise

Wednesday 19 February 2020

Makey Makey Links

Have fun with your Makey Makey with these links.

Makey Makey Piano
Makey Makey Bongos
Scratch 3

Coding with Microbits

Links for Micro:bit Coding

  1. What is a micro:bit?
    https://microbit.org
  2. Start coding here: https://makecode.microbit.org
  3. Empty project with Maqueen extensions.  (click Edit when the project opens):
    https://makecode.microbit.org/61469-45451-87527-4263
  4. Starter project with extensions and RGB ambience colours. (Click Edit when the project opens):
    https://makecode.microbit.org/_PPvVDoYx7Dzq
  5. Starter code for Fire Danger Part 2.

Want Your Own Micro:bit?

If you like experimenting with the Micro:bit, you may like to buy your own. They are not expensive. Here are links to 2 online stores that sell them and additional resources to use with them.
  1. Core ElectronicsLittle Bird Electronics.
  2. Leads with alligator clips.
  3. Projects to try with Micro:bits.
There are lots more Microbit project ideas to find. Just do a Google search.

Fire Danger Sign

 MVAC Year 6                 Starter project for Fire Danger Sign Part 2 .