getting started with hallowing for hackaday supercon …...more project ideas the full hallowing...

15
Getting Started with HalloWing for Hackaday Supercon Attendees Created by John Park Last updated on 2019-08-12 09:34:01 PM UTC

Upload: others

Post on 25-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Getting Started with HalloWing for Hackaday SuperconAttendees

Created by John Park

Last updated on 2019-08-12 09:34:01 PM UTC

Page 2: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Overview

Welcome to CircuitPython!

Hello Hackaday Supercon Fans - we wanted to have a fun electronic item, that does more than just a sticker!

What you have in your hand is a Hallowing M0 Express with special thanks to Digi-Key for making it possible for 400 ofthese to make it to the event!

THANK YOU Digi-Key! (https://adafru.it/BJr)

Python Powered?

Yep! This hardware comes pre-loaded with CircuitPython (https://adafru.it/BeW)! CircuitPython is Adafruit's branch ofMicroPython designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier thanever to get prototyping by requiring no upfront desktop software downloads.

With CircuitPython you can write clean and simple Python 3 code to control hardware instead of having to use complexlow-level languages like C or C++ (what Arduino uses for programming). It's great for beginners and is powerful forexperts.

Simply plug the board into your computer or laptop and edit the code and files on the disk drive that appears.

What You Get

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 3 of 16

Page 3: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Each attendee will get a kit of the following:

What Code Am I running?

On the device are images and code to get started:

code.py is the default code, its a slideshow that runs any 128 x 128 bitmap in the /images folder on the device.

slideshow_code.py is a copy of the above in case you lose itqr_code.py makes the URL in the code a QR code to display, handy for your personal site or repo! Note thistakes a few seconds to generate in pure python so give it some time.touchslideshow_code.py is a version of the slide show that has forward and back and brightness by touchingthe metal teeth.

Your browser does not support the video tag. Adafruit HalloWing M0 Express

$34.95IN STOCK

ADD TO CART

USB cable - USB A to Micro-B

$2.95IN STOCK

ADD TO CART

Lithium Ion Polymer Battery Ideal For Feathers - 3.7V400mAh

$6.95IN STOCK

ADD TO CART

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 4 of 16

Page 4: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Whichever file is named code.py is the one that runs, change the name to change the program.

Once saved the device automatically restarted and runs that code!

Also included is a sample chapter from "Getting Started with Adafruit Circuit Playground Express: The MultipurposeLearning and Development Board from Adafruit" 1st Edition by Mike Barela (https://adafru.it/CWd)

Your HalloWing Hardware at a glance

You can get a lot more details on every part and pinout by visiting the Hallowing guide athttps://learn.adafruit.com/adafruit-hallowing (https://adafru.it/CwH)

A built in battery charger will keep the Lipoly topped-up while plugged into USB.

CircuitPython Quick Start

Changing the code is as easy as editing code.py in your favorite text editor.

Our recommended editor is Mu (https://adafru.it/ANO), which is great for simple projects, and comes with a built inREPL serial viewer! It is available for Mac, Windows & Linux

https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor/ (https://adafru.it/CV-)

https://codewith.mu/ (https://adafru.it/Be6)

After the file is saved, CircuitPython will automatically reload the latest code.

ONE MORE THING - there is a special discount code for attendees at hackaday supercon, it's 10% off in theAdafruit store, enjoy! check the readme file on your badge for the code!�

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 5 of 16

Page 5: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Connecting to the serial port will give you access to sensor information, better error messages and an interactiveCircuitPython (known as the REPL). On Windows we recommend Mu, Tera Term or PuTTY.

On Mac OSX and Linux, use Mu or 'screen' can be used from a terminal.

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 6 of 16

Page 6: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Slide Shows

Your HalloWing is pre-loaded with a CircuitPython program that uses the Image SlideShow library.

If you need to re-download the files that were pre-loaded on your HalloWing, here's the repo (https://adafru.it/CW3).

Running a slideshow in CircuitPython on the HalloWing is dead easy! Here's the example code which automaticallyplays through all .bmp images in the /images directory on the board.

Change from when this guide was first written

To make new slideshows, Adafruit suggests following this more recent slideshow guide:

Creating Slideshows in CircuitPython (https://adafru.it/Fx8)

That code uses an updated version of the SlideShow library using new display drivers using the CircuitPythonDisplayIO library. This makes it compatible with a wide range of displays.

This code is only left in to show you the code for the original Hackaday Badge. Pleas follow the guide link above tomake more modern slide shows with the same ease.

Please do not use the code below if you are running CircuitPython 4 or later.�

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 7 of 16

Page 7: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Making Images for Your Slide Show

BMPs in Windows

Microsoft Paint works really well!

Make your 128x128 image,

import boardfrom adafruit_slideshow import PlayBackOrder, SlideShowimport pulseio

# Create the slideshow object that plays through once alphabetically.slideshow = SlideShow(board.DISPLAY, pulseio.PWMOut(board.TFT_BACKLIGHT), folder="/images", loop=True, order=PlayBackOrder.ALPHABETICAL, dwell=2.5)

while slideshow.update(): pass

Your images should be 128x128 pixels, 24 bit color, uncompressed BMP format only�

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 8 of 16

Page 8: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Save as... BMP picture

Save it to the badge filesystem /images folder as 24-bit

Bitmap (*.bmp) and make sure the file name ends with

.bmp as well

BMPs in Mac, Linux, etc.

There are several online image conversion websites which convert a file from one format to another. We'll show youone below but you can experiment with either other websites or Mac/Linux 3rd party image programs which mayoutput BMP files.

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 9 of 16

Page 9: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

We've used https://image.online-convert.com/convert-

to-bmp (https://adafru.it/CWD) to convert images to BMP

format on the web. Take your 128x128 pixel color image

file on your computer and drag/choose the file where

indicated on the website.

Press the Start Conversion button below the file box.

If you need to tweak the settings, the site allows you

options but it's best that you already have a color

128x128 pixel image to convert via the web.

When the conversion is done, a dialog should pop up in

the browser to say where would you like to save the file

(now converted with a .bmp file name extension).

Now you have a BMP file! To load onto your HalloWing, use your finder or linux file manager. Plug in your HalloWing toyour computer via a good data USB cable. The board should show up as a flash drive named CIRCUITPY. Now copythe BMP into the directory on CIRCUITPY named /images. There you go, done!. You can go into the images directoryand add / change / delete BMPs as you wish.

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 10 of 16

Page 10: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 11 of 16

Page 11: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

More Project Ideas

The full HalloWing guide (https://adafru.it/CwH) is a great place to dive into details on your board. It will give you infoon pinouts (https://adafru.it/CW0), powering the board, onboard sensors and more.

There, you'll also learn about setting up the HalloWing for use with Arduino IDE (https://adafru.it/Cpl) andCircuitPython (https://adafru.it/CmJ).

Specialized Firmware

If you'd like to fire up the HalloWing in bootloader mode and drag on some fun, ready-to-go firmware .uf2 files, we'vegot you covered:

Spooky Eyes (https://adafru.it/CEs) Includes Human, Dragon, No Sclera, Newt, and Terminator flavors!)Spirit Board (https://adafru.it/CW1) the Not-so-Mystifying oracleMinotaur Maze (https://adafru.it/CW2) ray-cast 3D(ish) Graphics demoLast Minute Halloween Accoutrements (https://adafru.it/CK0) Star Trek badge and Mario Jump prop (you'll need aspeaker to hear the sound effects)

All of these projects can be customized and built from source as well if you'd like, there are details in each guide.

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 12 of 16

Page 12: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Find a Friend

Want to team up with one of your new found friends at Supercon and create a pair of synced eyeballs on twoHalloWings? You can do it over I2C, as detailed in the Synchronized Eyes with Two HalloWings (https://adafru.it/CWz)guide.

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 13 of 16

Page 13: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

Custom Cases

Here are a selection of case ideas for when you get in front of your 3D printer.

Full information on how to print them is contained in the respective guide linked on this page.

Want to jump on one of the Design Lab's 3D printers and make a case for your HalloWing? Here are a couple ofdesigns:

HalloWing Case (https://adafru.it/CW4)

Nine Ball Case (https://adafru.it/CzU)

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 14 of 16

Page 14: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

HalloWing Wearable Case (https://adafru.it/CzV)

© Adafruit Industries https://learn.adafruit.com/getting-started-with-hallowing-for-hackaday-supercon-attendees Page 15 of 16

Page 15: Getting Started with HalloWing for Hackaday Supercon …...More Project Ideas The full HalloWing guide ( is a great place to dive into details on your board. It will give you info

© Adafruit Industries Last Updated: 2019-08-12 09:34:01 PM UTC Page 16 of 16