Friday, 30 November 2018

25 Minecraft hacks of Christmas '18


Over the next 25 days I shall be recycling existing blogs and maybe a few new ones to look at 25 different coding experiments with Minecraft and Python.

Day 1: Modding interface with GUIZero. This experiment pulls together several previous coding experiments and cements them all into one GUI which can trigger a range of different array of block based events.

Read more here ...... Link

Day 2: This blog has a link to dozens and dozens of my Minecraft experiments from over the years. They are all linked into a pdf document called the 'hackpack' here is the link to the related blog .........Link

Day 3: Getting started with BitIO and MInecraft....... Link

Day 4: BitIO and Minecraft 'Tilting Rainbow Road'......... Link


Day 5: EduBlocks  and MInecraft getting started............ Link


Day 6: EduBlocks  and MInecraft ...........Amen to walking blocks............Link


Day 7: BitIO  and MInecraft 'Touching pins takes you places'...........Link


Day 8: Edublocks / BitIO and MInecraft..........The Liverpool Makefest Minecraft Pixel art Twitter bot........... Link


Day 9: BitIO and MInecraft  ''Minecraft CPU temperature graphing"


Day 10: Edublocks and Minecraft 'Bridging the gap between visual coding and text based coding with EduBlocks'.......Link

Day 11: MInecraft Education Edition My First Command Block.......Link

Day 12: BitIO and MInecraft : PixelCraft.......Link


Day 13: Minecraft Education Edition: Give inventory and changing weather.......Link


Day 14: BitIO and MInecraft 'Micro:bit Transport' ........LInk


Day 15: M:EE MakeCode 'Get coding'........Link

Day 16: BitIO and MInecraft 'Scalable Housing'..........Link

Day 17: MInecraft Education Edition: MakeCode Getting started........Link

Day 18: MInecraft Education Edition:MakeCode 'Wool Wall'........Link

Day 19: Raspberry Pi Minecraft controlling Lego motors .... Link

Day 20: Raspberry Pi and Minecraft: Pixel Cakes(RPI big birthday weekend resource)
...................link

Day 21:  Raspberry Pi and Minecraft: Pixel Craft 2.0......Link

Day 22: Raspberry Pi and Minecraft: Experiments with GPIO triggers and Minecraft
.......Link

Day 23: Minecraft Education Edition: Vertical farming ......Link

Day 24: Raspberry Pi and Minecraft: GPIO zero Minecraft "Whack on board Led's"
........Link

If you like this blog check out all the others here

TUI Calculator/ binary to denary conversion



This is code covers:


  • Casting 
  • Functions 
  • Tui's
  • Basic input
  • Procedures
  • String element checking
  • Basic mathematical operators
  • Simple validation on binary section
It allows the user to chose from a text based menu and either:

  • add, subtract, divide or multiply two numbers that the user inputs
  • enter an 8 bit binary number and convert it denary
Here is the code:

Over

If you like this blog check out all the others here

Monday, 26 November 2018

Lists and TUI's


Here is a program I used with year 9 to introduce list basic list functions and TUI's.
It contains:

  • selection
  • procedures
  • procedure calls
  • casting 
  • pop
  • remove 
  • lists 
  • append
It is a very simple simulation of a "game server" allows the user to add gamer tags, remove and pop off the end of the list. 

Here is the code : link

If you like this blog check out all the others here

Tuesday, 6 November 2018

Micro:bit Express 2.0 'adjustable speed'



This is an incremental improvement to the original Micro:bit Express which went via remote control fwd and back and stop. The next project the Micro:bit controlled Ferris Wheel allowed you to adjust the speed within a small range. This project applies the same logic to the train with a greater range of speed.

You will need all the same kit as in the original blog here is the key info:


  • A video of the updated train in action link
  • Code for the updated remote link
  •  Code for the updated motor controller link 
Enjoy :)

If you like this blog check out all the others here

Monday, 29 October 2018

Micro:bit Controlled Lego Ferris Wheel


Micro:bit Controlled Lego Ferris Wheel 

Here is the basics of what you need to create your own remote controlled Micro:bit Ferris Wheel. You will need:

  • 2 x Micro:bits
  • 1 x Lego Ferris Wheel
  • 1 x 4.5 battery box
  • 1 Kitronic motor controller link 
  • 1 Lego motor

Here are photos of the set up.






Video of action

link

remote code link

motor controller code link

Over :)

If you like this blog check out all the others here

Harry Potter sorting




This code consolidates:

  • Lists
  • Count controlled loops
  • Conditions 
  • IF Then Else 
  • Random and time libraries.
I've used this with year 9 who have just done basics with input, loops, basic conditions etc. This takes their learning a little deeper without killing it.

Here is the link to the code: link

Here is the code:


import random
import time

Students_List = ["Harry","Ron","Dave","Hermione"]

Slytherin_Students = [] # stores s students
Hufflepuff_Students = [] # stores hp students
Ravenclaw_Students = [] # stores rc students
Gryffindor_Students = [] # stores g students

House_Names = ["Gryffindor", "Ravenclaw", "Hufflepuff", "Slytherin"] # list of house names to randomly select.

#create a variable to store current position in student list
Current_Student = 0

while Current_Student < len(Students_List) :
#randomly choose a house for the 1st student
House = random.choice(House_Names)
time.sleep(5)
print("Your house is",House)
#add student to correct house list
if House == "Gryffindor":
Gryffindor_Students.append(Students_List[Current_Student])
print(Gryffindor_Students)#show house population

elif House == "Ravenclaw":
Ravenclaw_Students.append(Students_List[Current_Student])
print(Ravenclaw_Students)#show house population

elif House == "Hufflepuff":
Hufflepuff_Students.append(Students_List[Current_Student])
print(Hufflepuff_Students)#show house population
elif House == "Slytherin":
Slytherin_Students.append(Students_List[Current_Student])
print(Slytherin_Students)

else:
print("You have chosen a house that doesn't currently exist")


#add one to current position in student list
Current_Student = Current_Student + 1



If you like this blog check out all the others here

Python programming resources



Here are a links to any Python resources that do not involve any hardware such as Raspberry Pi or Micro:bit.


Blog 1 Harry Potter sorting
link


If you like this blog check out all the others here