TANGIBLE TOOLS FOR
TEACHING WITH PYTHON
TONY DICOLA
PYCON 2017
ABOUT ME
▸ Tony DiCola, tdicola@adafruit.com
▸ Engineer for Adafruit Industries
▸ Adafruit creates hardware and
tutorials to make electronics
accessible to anyone.
WHAT IS PHYSICAL COMPUTING?
▸ Physical computing is to “creatively
design tangible interactive objects
or systems using programmable
hardware” (M. Przybylla and R.
Romeike)
M. Przybylla and R. Romeike, "Key Competences with Physical Computing," in Proceedings
of Key Competencies in Informatics and ICT 2014, Vol. 13, No. 2, 241-245.
THREE PILLARS OF PHYSICAL COMPUTING
M. Przybylla and R. Romeike, "Key Competences with Physical Computing," in Proceedings
of Key Competencies in Informatics and ICT 2014, Vol. 13, No. 2, 241-245.
TOOLS
M. Przybylla and R. Romeike, "Key Competences with Physical Computing," in Proceedings
of Key Competencies in Informatics and ICT 2014, Vol. 13, No. 2, 241-245.
▸ Programmable Toys & Bricks
▸ I/O Devices
▸ Microcontroller Boards
▸ Mini Computers
WHERE DOES PYTHON RUN?
▸ On your computer,
tethered to hardware.
▸ On your hardware,
natively.
PROGRAMMABLE
BRICKS AND TOYS
PROGRAMMABLE BRICKS & TOYS
LITTLEBITS
▸ Kid-friendly modular electronics
platform. Build things without
soldering or programming.
▸ Tethered Python control of bits.
▸ Arduino bit with Firmata
firmware.
▸ Cloud bit web API: http://
developers.littlebitscloud.cc/
PROGRAMMABLE BRICKS & TOYS
LEGO MINDSTORMS EV3
▸ Latest version of LEGO’s
Mindstorms physical
computing platform.
▸ Native Python support using
ev3dev firmware:
www.ev3dev.org and
www.ev3python.com
PROGRAMMABLE BRICKS & TOYS
TOY ROBOTS & DRONES
▸ Tethered Python control of many
toy robots and drones is possible.
▸ iRobot Create 2 - http://
www.irobot.com/About-iRobot/
STEM/Create-2.aspx
▸ Unofficial Python libraries for
other toy bots & drones:
▸ Sphere / BB8
▸ Dash & Dot
▸ Parrot AR.Drone
PROGRAMMABLE BRICKS & TOYS
EDISON ROBOT
▸ Inexpensive programmable two-
wheeled robot created by
Microbric.
▸ LEGO compatible chassis.
▸ Native python control with EdPy
online editor. Write code in Python
to control the bot and upload it
using audio cable.
I/O DEVICES
I/O DEVICES
PHIDGETS
▸ USB-compatible sensors and
actuators.
▸ Extensive programming language
support, including Python.
I/O DEVICES
CIRCUIT PLAYGROUND
▸ All-in-one electronics learning
board with built-in lights, switches,
and sensors.
▸ Tethered Python control with
Firmata firmware: https://
learn.adafruit.com/circuit-
playground-firmata/
I/O DEVICES
HCI (HUMAN CONTROL INTERFACE)
▸ Makey Makey and Circuit
Playground boards act like
keyboards based on touch input.
▸ Easy interactivity for Python
programs on your computer.
I/O DEVICES
HCI (HUMAN CONTROL INTERFACE)
MICROCONTROLLERS
MICROCONTROLLERS
ARDUINO & FIRMATA
▸ Arduino is a a microcontroller-
based electronics learning
platform.
▸ Firmata is a protocol for controlling
an Arduino from a computer:
http://www.firmata.org/
▸ Python can talk the Firmata
protocol for tethered control of
Arduino hardware.
▸ pymata_aio and PyMata libraries
MICROCONTROLLERS
MICROPYTHON - PYBOARD
▸ Native Python code execution on
microcontrollers:
http://www.micropython.org/
▸ Excellent support for nearly all
Python 3 core language features.
▸ Interactive REPL for direct control
of hardware.
▸ Early days—tooling and ecosystem
maturing.
MICROCONTROLLERS
MICROPYTHON - ESP8266
▸ ESP8266 WiFi microcontroller
created by Espressif for IoT
gadgets.
▸ Great MicroPython support
including WiFi & network access.
▸ Good balance price &
performance.
MICROCONTROLLERS
MICROPYTHON - MICRO:BIT
▸ BBC micro:bit is an all-in-one
electronics learning board with
lights, sensors, and wireless
communication.
▸ Comprehensive MicroPython
support for board peripherals.
▸ Very limited memory, just a few
kilobytes available!
▸ Online and desktop Python
programming editors available.
MICROCONTROLLERS
CIRCUITPYTHON - M0 & CIRCUIT PLAYGROUND EXPRESS
▸ Adafruit Feather M0, Metro M0 &
Circuit Playground Express boards
support CircuitPython (a
MicroPython derivative).
▸ Based on Atmel SAMD21
microcontroller.
▸ Python code loaded over USB
drive, edit and run anywhere.
▸ Express boards add extra flash
memory for program storage.
MICROCONTROLLERS
MICROPYTHON - WIPY, LOPY
▸ WiPy & LoPy are IoT-focused
MicroPython boards from Pycom.
▸ Extensive wireless communication
support (WiFi, Bluetooth, long
range 900mhz).
▸ Mobile, desktop, and cloud control
of boards and code.
MINI COMPUTERS
MINI COMPUTERS
RASPBERRY PI
▸ Education focused small-board
Linux computer from the
Raspberry Pi foundation.
▸ Pi Zero, lower cost minimal version
of Raspberry Pi.
▸ HAT add ons plug in to 26-pin
header to extend capabilities.
▸ Excellent Python support with
libraries like gpiozero: https://
gpiozero.readthedocs.io/
MINI COMPUTERS
OTHER MINI COMPUTERS
▸ Beaglebone boards: http://http://
beagleboard.org/
▸ Orange Pi: http://
www.orangepi.org
▸ Intel Edison & Curie
SUMMARY
DEMOS

Tangible Tools For Teaching With Python

  • 1.
    TANGIBLE TOOLS FOR TEACHINGWITH PYTHON TONY DICOLA PYCON 2017
  • 2.
    ABOUT ME ▸ TonyDiCola, tdicola@adafruit.com ▸ Engineer for Adafruit Industries ▸ Adafruit creates hardware and tutorials to make electronics accessible to anyone.
  • 3.
    WHAT IS PHYSICALCOMPUTING? ▸ Physical computing is to “creatively design tangible interactive objects or systems using programmable hardware” (M. Przybylla and R. Romeike) M. Przybylla and R. Romeike, "Key Competences with Physical Computing," in Proceedings of Key Competencies in Informatics and ICT 2014, Vol. 13, No. 2, 241-245.
  • 4.
    THREE PILLARS OFPHYSICAL COMPUTING M. Przybylla and R. Romeike, "Key Competences with Physical Computing," in Proceedings of Key Competencies in Informatics and ICT 2014, Vol. 13, No. 2, 241-245.
  • 5.
    TOOLS M. Przybylla andR. Romeike, "Key Competences with Physical Computing," in Proceedings of Key Competencies in Informatics and ICT 2014, Vol. 13, No. 2, 241-245. ▸ Programmable Toys & Bricks ▸ I/O Devices ▸ Microcontroller Boards ▸ Mini Computers
  • 6.
    WHERE DOES PYTHONRUN? ▸ On your computer, tethered to hardware. ▸ On your hardware, natively.
  • 7.
  • 8.
    PROGRAMMABLE BRICKS &TOYS LITTLEBITS ▸ Kid-friendly modular electronics platform. Build things without soldering or programming. ▸ Tethered Python control of bits. ▸ Arduino bit with Firmata firmware. ▸ Cloud bit web API: http:// developers.littlebitscloud.cc/
  • 9.
    PROGRAMMABLE BRICKS &TOYS LEGO MINDSTORMS EV3 ▸ Latest version of LEGO’s Mindstorms physical computing platform. ▸ Native Python support using ev3dev firmware: www.ev3dev.org and www.ev3python.com
  • 10.
    PROGRAMMABLE BRICKS &TOYS TOY ROBOTS & DRONES ▸ Tethered Python control of many toy robots and drones is possible. ▸ iRobot Create 2 - http:// www.irobot.com/About-iRobot/ STEM/Create-2.aspx ▸ Unofficial Python libraries for other toy bots & drones: ▸ Sphere / BB8 ▸ Dash & Dot ▸ Parrot AR.Drone
  • 11.
    PROGRAMMABLE BRICKS &TOYS EDISON ROBOT ▸ Inexpensive programmable two- wheeled robot created by Microbric. ▸ LEGO compatible chassis. ▸ Native python control with EdPy online editor. Write code in Python to control the bot and upload it using audio cable.
  • 12.
  • 13.
    I/O DEVICES PHIDGETS ▸ USB-compatiblesensors and actuators. ▸ Extensive programming language support, including Python.
  • 14.
    I/O DEVICES CIRCUIT PLAYGROUND ▸All-in-one electronics learning board with built-in lights, switches, and sensors. ▸ Tethered Python control with Firmata firmware: https:// learn.adafruit.com/circuit- playground-firmata/
  • 15.
    I/O DEVICES HCI (HUMANCONTROL INTERFACE) ▸ Makey Makey and Circuit Playground boards act like keyboards based on touch input. ▸ Easy interactivity for Python programs on your computer.
  • 16.
    I/O DEVICES HCI (HUMANCONTROL INTERFACE)
  • 17.
  • 18.
    MICROCONTROLLERS ARDUINO & FIRMATA ▸Arduino is a a microcontroller- based electronics learning platform. ▸ Firmata is a protocol for controlling an Arduino from a computer: http://www.firmata.org/ ▸ Python can talk the Firmata protocol for tethered control of Arduino hardware. ▸ pymata_aio and PyMata libraries
  • 19.
    MICROCONTROLLERS MICROPYTHON - PYBOARD ▸Native Python code execution on microcontrollers: http://www.micropython.org/ ▸ Excellent support for nearly all Python 3 core language features. ▸ Interactive REPL for direct control of hardware. ▸ Early days—tooling and ecosystem maturing.
  • 20.
    MICROCONTROLLERS MICROPYTHON - ESP8266 ▸ESP8266 WiFi microcontroller created by Espressif for IoT gadgets. ▸ Great MicroPython support including WiFi & network access. ▸ Good balance price & performance.
  • 21.
    MICROCONTROLLERS MICROPYTHON - MICRO:BIT ▸BBC micro:bit is an all-in-one electronics learning board with lights, sensors, and wireless communication. ▸ Comprehensive MicroPython support for board peripherals. ▸ Very limited memory, just a few kilobytes available! ▸ Online and desktop Python programming editors available.
  • 22.
    MICROCONTROLLERS CIRCUITPYTHON - M0& CIRCUIT PLAYGROUND EXPRESS ▸ Adafruit Feather M0, Metro M0 & Circuit Playground Express boards support CircuitPython (a MicroPython derivative). ▸ Based on Atmel SAMD21 microcontroller. ▸ Python code loaded over USB drive, edit and run anywhere. ▸ Express boards add extra flash memory for program storage.
  • 23.
    MICROCONTROLLERS MICROPYTHON - WIPY,LOPY ▸ WiPy & LoPy are IoT-focused MicroPython boards from Pycom. ▸ Extensive wireless communication support (WiFi, Bluetooth, long range 900mhz). ▸ Mobile, desktop, and cloud control of boards and code.
  • 24.
  • 25.
    MINI COMPUTERS RASPBERRY PI ▸Education focused small-board Linux computer from the Raspberry Pi foundation. ▸ Pi Zero, lower cost minimal version of Raspberry Pi. ▸ HAT add ons plug in to 26-pin header to extend capabilities. ▸ Excellent Python support with libraries like gpiozero: https:// gpiozero.readthedocs.io/
  • 26.
    MINI COMPUTERS OTHER MINICOMPUTERS ▸ Beaglebone boards: http://http:// beagleboard.org/ ▸ Orange Pi: http:// www.orangepi.org ▸ Intel Edison & Curie
  • 27.
  • 28.