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.:)

No comments:

Post a Comment