Git Product home page Git Product logo

micropython-microbit-kitronik-zip-tile's Introduction

micropython-microbit-kitronik-zip-tile

Example MicroPython (for BBC micro:bit) code for the Kitronik ZIP Tile ( www.kitronik.co.uk/5645 )

Overview

This repo contains an example of a MicroPython program for the Kitronik ZIP Tile. No unique functions are required to use the ZIP Tile, just the normal use of the 'microbit' and 'neopixel' libraries. Some helpful calculations have been provided for setting the (x,y) ZIP LED coordinates on multi-tile displays.

Example File

The file 'zip_tile_upython_example.py' is a simple program which just sets a single ZIP LED at position (3,3) to be white.

The 'setup_zip_tile_display' function takes the following parameters: (Number of Horizontal Tiles, Number of Vertical Tiles, BBC micro:bit Position) Note: See the product datasheet at the above web address for an explanation of BBC micro:bit positions. The function then creates a string of NeoPixels the appropriate length.

The 'zip_tile_plot' function takes the following parameters: (x-coordinate, y-coordinate, Red LED brightness, Green LED brightness, Blue LED brightness) The function then establishes which ZIP LED should be turned on depending on the coordinates, the number of ZIP Tile, the arrangement of the ZIP Tiles in te display and the position of the BBC micro:bit - there are different equations for each one.

License

MIT

Supported Targets

BBC micro:bit

micropython-microbit-kitronik-zip-tile's People

Contributors

alasdairatkitronik avatar kitronikltd avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

bosconi phill-85

micropython-microbit-kitronik-zip-tile's Issues

2 x 2 tile array not set correctly

I was looking to refactor your code, so added some tests to ensure that I did not break anything. However, the tests higlighted a bug when using a 2 x 2 tile array. See the comments in https://github.com/phill-85/micropython-microbit-kitronik-zip-tile/blob/master/tests.py for more info)
2 x 2 tile arrays do not work as expected as some LEDs get set multiple times, and negative indexes are attempted to be set.

I only have 2 zip tiles, so I cannot test this in RL. But if you wanted to donate a couple extra tiles to an OSS dev I would have a look at fixing this ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.