Daily tips and tricks from the experts at Adafruit!
View this email in your browser

This week CircuitPython 2.1.0 was released!  A major feature of this release is the addition of the pulseio module (for pulse and PWM output, like to dim LEDs) for all boards including Trinket M0 and Gemma M0.  There are lots of other smaller features and fixes, check out the full list from the release page:

  • The touch/no-touch threshold computation for TouchIn pins has been adjusted to be more sensitive. Added .raw_value and .threshold value access. Thanks to @ladyada for finding and testing.
  • ESP8266: Updated built-in neopixel support and library to match M0 boards. Thanks @jerryneedell.
  • The Circuit Playground Express release now includes several libraries built into the firmware. This saves considerable RAM when they are imported. To enable, remove the library .mpy files from your sys.path (e.g., from your lib/ directory). To override, put a newer version on your sys.path. The modules included are:
  • New gamepad module scans pins for debounced button presses regularly in the background. Thanks to @deshipu.
  • Added names for analog pins on Trinket M0. Update by @jerryneedell.
  • M0 boards: Turned on higher current drive capability for DigitalOut pins.
  • Status NeoPixel or DotStar brightness is now adjustable (#246). Thanks to @asherlie.
  • Switched to using a smaller version of the math library to make room for other features. Complex number support is also turned off on non-Express boards to make room.
  • Support added for hacked Trinket M0 with added SPI flash (Trinket M0 Haxpress). Thanks to @deshipu.
  • Pin A0 is no longer available as a TouchIn pin on Circuit Playground Express. It is unreliable because it is also connected to the on-board speaker
  • All ...io objects (AnalogIn, DigitalInOut, etc.) now raise an exception if you try to reuse them after they are deinitialized (deinit()). Previously, reuse might cause crashes. Thanks to @tdicola for uncovering.
  • Reset PDIMIn pins after deinit(). Thanks @tdicola for finding this problem.
  • ESP8266: Fixed problems with SPI.
  • Reinitialize the ADC before every use. Thanks @ladyada for reporting erratic ADC results.
  • If CircuitPython restarts in safe mode, it does not attempt to re-create the SPI or internal flash filesystem if it appears to be damaged or missing. @tdicola noticed that this may occur when a battery runs down.

Check out the CircuitPython 2.1.0 release blog post for more details about how to load and use the latest CircuitPython on your Adafruit M0 and ESP8266 boards!

In addition check out these new CircuitPython guides in the Adafruit Learning System: