Sunday, 21 January 2018

BitIo blog 11: PixelCraft 2.0


This code uses the Micro:bit as an interactive controller in Minecraft. You can read all about it in BitIO blog 1 here to fully understand how to set it up and run it. But suffice to say that the Brains behind it is David Whale. Over the course of the the last 5 months I have been integrating the Micro:bit into my Minecraft coding experiments.
This is the latest.... In a short summary this builds on blog 9 PixelCraft which was building on work done by Kari Lawler you can read about that here.  This updated edition will render the normal Pixelart with the press of the 'a' button, with the 'b' button you can render the same pixel art with random wool colours. The overall effect is a pop art style pixel art.

You can see for yourself below:

Below you can see a twitter video of this code working:


Picture of the various pixel art forms you can produce


Here is the code:


Alex Pixel art code
link
Pig Pixel art code
link
Steve Pixel art code
link

Enjoy,

Chris Penn.

BitIO blog 10: Micro:bit transport


This code uses the Micro:bit as an interactive controller in Minecraft. You can read all about it in BitIO blog 1 here to fully understand how to set it up and run it. But suffice to say that the Brains behind it is David Whale. Over the course of the the last 5 months I have been integrating the Micro:bit into my Minecraft coding experiments. This is the latest.... In a short summary this allows you to create a TNT line of blocks and through the press of the 'a' button on the Micro:bit allows you to power the character along. If you press the 'b' button you can teleport back to your starting point. You can see for yourself below:

Below you can see a twitter video of this code working:


Picture of code working in Minecraft:


Here is the code:

link

Enjoy,

Chris Penn.

EduBlocks for Micro:bit Blog 3: Random Names

Random names


Here is a simple random name generator................

Code

Hex: link
XML: link
Micropython: link

Enjoy!

Chris Penn
Blog 

EduBlocks for Micro:bit blog 2: For loops

For Loops


Here are two simple examples of for loops ................

Basic for loop:

Hex: link
XML: link
Micropython: Link
More efficient for loop: 
Hex: link
XML:link

Micropython:link

Enjoy!

Chris Penn

Tuesday, 16 January 2018

EduBlocks: Micro:bit blog 1, Variables, buttons and lists.



EduBlocks: Micro:bit blog 1, Variables, buttons and lists.

Simple Variable

With Loop

 

 Variables with button interaction

 

 List with button interaction




Wednesday, 3 January 2018

BitIO blog 9: PixelCraft

First of all to you will need to read this blog about how to get started using BitIO(Made by David Whale).


This uses David Whale's BitIO library Python library for the Micro:bit. His library can be accessed from here:


The original worksheet code was created by Kari Lawler for her Leamington Raspberry Jam workshop in November. I have extended and modified bits accordingly. This is very much a joint effort.  

Below are the current Pixel Art that you can generate:

Steve

Alex 
Creeper 
Pig 
Storm Trooper 

Intro
The main aspect for me is finding new ways of teaching 2d arrays / lists. This is an excellent tool to do this. For now you can access three base versions:
  • Static (you run the Python script and it will render the Pixel Art in front of you.)
  • MB Button (basically the same Pixel Art triggered by pressing a button on the Micro:bit)
  • The MB Pin touched version(basically the same Pixel Art triggered by holding pin 0 and pin GND on the Micro:bit)
  • There is a fourth version which can be run as all three above which runs through all current Pixel Art objects in sequence and is accessible as static, button pressed and pin touched.

Scripts
Static Pixel Art scripts

Alex

Steve

Pig 

Creeper

Pixel Loop


Micro:bit button push scripts

Alex

Pixel Loop


Micro:bit Pins touched scripts

Alex


Pixel Loop


I will be coming back to this but for now this is a good enough start.

Enjoy,

Chris Penn.:)