Adafruit Feather M0 Express

The courier showed up today, with a really neat new board from Adafruit – the Feather M0 Express. It is essentially a break out board for the Microchip (formerly Atmel) ATSAMD21G18, which is the same 32-bit 48MHz ARM M0+ micro used in the Arduino Zero, plus a 2MB flash memory, RGB LED, and a LiPoly charger. It’s not too expensive at $20USD, nice and tiny, and I think could be a real hit.

Using the Feather M0 Express from Arduino IDE almost couldn’t be easier – just add the Adafruit Board Manager URL to your Arduino IDE settings, then install the “Adafruit SAMD Boards” – instructions at https://learn.adafruit.com/add-boards-arduino-v164 .

However, the really exciting new option available with this new board, is CircuitPython – Adafruit’s implementation of MicroPython. Getting setup for CircuitPython is super easy, though the documentation is still under development so it might seem a bit intimidating at first read. Here’s what I did:

  1. Download the latest CircuitPython uf2 file for your board from https://github.com/adafruit/circuitpython/releases
  2. Connect the Feather to your computer via USB
  3. Put the Feather in to bootloader mode by “double clicking” the reset button. You’ll know it works when the #13 LED starts fading on and off.
  4. Copy the uf2 file from step 2, on to the FEATHERBOOT USB drive that should have appeared in step 3.  Wait a few seconds.

There should now be a USB drive available called CIRCUITPY, and a virtual serial port available.

Using your favourite serial console with the virtual serial port gives an interactive terminal, aka REPL, which can be used directly as below. Or, just save a source file as main.py in the CIRCUITPY drive to get your program to run at boot.

Adafruit CircuitPython 0.9.5 on 2017-04-14; Adafruit Feather M0 Express with samd21g18
>>> print("hi")
hi
>>> help()
Welcome to Adafruit CircuitPython 0.9.5!

Please visit learn.adafruit.com/category/circuitpython for project guides.

Built in modules:
 __main__
 builtins
 micropython
 array
(list continues)

Let’s make the “hello world” of embedded programming (but this time, done on-target using tab completion!):

>>> import digitalio
>>> import board
>>> import time
>>> with digitalio.DigitalInOut(board.D13) as led:
...     led.switch_to_output()
...     while True:
...         led.value = 1
...         time.sleep(0.5)
...         led.value = 0
...         time.sleep(0.5)

Arduinos for Absolute Beginners

Learn how to use an Arduino, a little bit of programming, and a little bit of
electronics. Absolutely no prior experience required!

What is an Arduino? Have a look at this video.

May 4th (7pm start) and 6th (2pm start), 2-3 hours, at the Dunedin Makerspace 11 Allen St. North East Valley.

Continue reading “Arduinos for Absolute Beginners”

Housekeeping

We’ve been doing a bit of work on the maker space lately, and this website too!

For the last several years, our website has been hosted on a VPS provided by Blair (thanks so much!) Now that we’ve got a reliable Internet connection at the makerspace though, we’re able to host the site from an on-site computer that’s already hosting the Valley Workspace, Dunedin Electric Bikes, and Quarantine Island sites, and some makerspace affiliated projects like Dunedin food truck tracker foodoo.nz. If you’re interested in how the Internet works, want to host a site, or have fun ideas for things to connect to the machine, just say the word!

As part of the website move, I’ve upgraded the WordPress install, and am planning to embark on a clean out of the Users (we’ve apparently got ~45k) and Comments databases. I’ll try to keep from deleting legitimate accounts, but if your dspace account disappears, just let me know and I can restore it.

Finally, some donated lights were installed last weekend, in the room adjoining the bike workshop, to light up that web server!

img_20161117_204420

3D printing in commercial products

I was recently tinkering with a thing at work, and was surprised to find that a couple internal parts of this thing are 3D printed using a printer of the same type we’ve got at the makerspace!

This is a Thinklabs One digital stethoscope, available for sale online through mainstream retailers for about $500USD. Check out the grey plastic ring around the blue part.

3d-printed-part

Using the inductor tester

inductor tester
The inductor tester, and inductors used for examples below

A few weeks back, we had a talk on KiCad (presentation available at http://ianrrees.github.io/KiCad_talk/ ) where we ordered some PCBs to make an inductor tester (Henryometer?) from dirty PCBs. Those boards came in this week, and a few folks have already put theirs together. This post aims to be a quick guide to the usage of the tester; if you’d like to build one yourself just let Ian know, parts cost is $15. You’ll need an oscilloscope and a current-limited DC power supply to make use of it.

Continue reading “Using the inductor tester”

Debugging AVRs (without Atmel Studio)

This post is somewhere between a guide and a collection of notes, aimed at debugging programs for AVR microcontrollers (like the ones in most Arduinos) “on target”. We’ll be using an AVR Dragon connected to the target micro via the normal 6-pin programming header, with a Mac or Linux PC as the host.

Although this is a bit more advanced than most of our other projects, it’s really quite approachable and is a very powerful technique for fixing AVR software problems.

From a high level; we’ll use a debugging program on a Mac (or Linux, Windows, etc) “host” computer, which communicates with a Dragon “In Circuit Emulator” (ICE) via USB to debug a buggy program running on the “target” AVR, which is presumably running in some circuit we’re interested in. Small variations might apply for Windows hosts, using JTAG instead of DebugWIRE, other debugger tools (Atmel JTAGICE mkII for example), etc.

Continue reading “Debugging AVRs (without Atmel Studio)”

Arduinos and Macs

arduino

This evening, I finally got around to unwrapping the Arduino clone that came with my DSpace membership. Starting a project for the board couldn’t be easier, using the nice Arduino IDE from https://www.arduino.cc, but I ran into a little snag when it was time to upload the program onto the board. It turns out that these clone Arduinos use a newish low-cost USB to serial converter chip called a CH340G, rather than the FTDI brand chips used in the genuine Arduino boards. The CH340G that isn’t supported by MacOS by default, and I use MacOS, so the board didn’t show up in the Arduino application’s list of serial ports…

Fortunately, other folks have run into the same problem and have written up some nice blog posts on how to solve exactly this issue!

Moving

As you may have heard, the Dunedin Maker Space is getting ready to move to a new location in the Northeast Valley. The Allen St Workshop provides exciting new opportunities for the maker space including a concrete floor, collaboration with other like-minded folks, and there’s a fibre optic box out front!

We’ll continue to meet in the current King Edward College location as usual until 8 August when the move to the Allen St Workshop will commence. Stay tuned!