[CentralOH] [Central OH] Additional details concerning the Circuit Playground Express

Eric Miller miller.eric.t at gmail.com
Wed Aug 1 11:52:29 EDT 2018

Very sorry I missed this!

Here <https://imgur.com/a/Zv3SY> is an example project my daughter and I
built together demonstrating an esp8266 with a webserver writted in
uPython, changing the colors of a 3d printed Minecraft Ore nightlight from
any browser connected to the same wifi network.  One thing that isn't
immediately obvious about the esp8266/32 ecosystem w micropython, is that *you
can build a wifi enabled python computer for about $3, *and update its code
from anywhere on the network using the micropython webrepl
<https://micropython.org/webrepl/>.  More details on this are below, at the
end of this email.

For those in the group who were inspired by microPython and/or the Adafruit
boards, here are some other really cool projects to check out:

   - *esp8266 dev boards.*  These are wifi-enabled dev boards that you can
   get for around $5 each on Amazon. <https://goo.gl/MBEnk8>
   - *esp32 dev boards*.  These are the next generation of the esp8266
   boards, with bluetooth, more GPIO pins, more processing power, etc.  around
   $9 each on Amazon
   - Both of the boards above can be purchased for sub $5 each in larger
   qtys' from China (Ali Express,etc)
   - *micropython* is fully supported on both of the boards above:
   - *esp8266*
      - *esp32*
         - Note: The ESP32 port is designed to be (almost) equivalent to
         the ESP8266 in terms of the modules and user-facing API. So
once you get
         micropython on your esp32, use the 8266 docs for 'how to use'
         - Check out these youtube channels/playlists for some really good
         info on the esp32 w uPython:
            - https://www.youtube.com/watch?v=qa2406iiSbI

One thing that's not immediately obvious about both the 8266/32 dev
boards:  there are a lot of unnecessary components that almost doubles the
cost of the dev boards.  USB to Serial, power supply, reset buttons etc.
Really all you need is the chip!  But, you can:

- buy just the bare esp8266/esp32 chips in bulk (dozens) for sometimes as
low as $2 each
- solder them onto a breakout board like the one below
- plug them into a breadboard
- flash them with micropython using an ftdi cable
<https://www.sparkfun.com/products/9718> (one cable can be used for n
number of chips)
- add your wifi credentials to boot.py per the instructions in the uPython
(see the part called 'Here is a function you can run (or put in your
boot.py file) to automatically connect to your WiFi network)
- enable the micropython webrepl:
- now, all you have to do is power the board from a battery or breadboard
power supply.  It will automatically connect to your wifi, and you can
manipulate files and write code over the webrepl:
-* now you have a wifi enabled python computer for $2-$3!*

[image: image.png]

On Wed, Aug 1, 2018 at 9:10 AM Damien Calloway <damiencalloway at fastmail.com>

> Hello all !
> Monday, we had a really cool demonstration and overview of the Adafruit
> Circuit Playground Express by Neil. For those of you who did not make it to
> the PyOhio class, his presentation was distilled from that. I had some
> trouble getting my board to cooperate, but there was some time earlier
> today where I was able to figure it out.
> Some details I learned :
> 1) Are you a Windows enthusiast ? You must install drivers first.
> https://learn.adafruit.com/adafruit-circuit-playground-express/adafruit2-windows-driver-installation
> That is a  bundle of all of the drivers needed for Adafruit boards - run
> it as Administrator.
> The installer will have the first three of five checkboxes checked by
> default. On a Windows device I was able to confirm that the default choices
> are correct - do not uncheck the middle two boxes, or serial and
> bootloading will not totally work.
> 2) Are you a Linux enthusiast ? Make sure your account is added to the
> uucp group (Debian/Linux Mint; other distros use dialup for the same
> thing). Otherwise, you will not be able to totally get into the board
> 3) I mistakenly thought that serial communication was needed to load
> programs onto the board. That is true for the BBC Microbit, but not for the
> Circuit Playground Express. You can literally drag and drop things onto the
> board, and save them from your editor of choice.
> 4) Speaking of which : I understand why Kattni told everyone to use Mu -
> it is super basic and goof-proof - but it does not remove hard tabs.
> Obviously, it would not have mattered if people were typing along with her
> during the class, but it does account for the root cause of the difficulty
> I had Monday night.
> When following her instructions to update the firmware, the code.py file
> that executes is replaced by a main.py - this does not run the demo, even
> after you change the name to code.py, because at some point in the process,
> hard tabs were introduced into the code listing, and Mu could not strip
> them out.
> Thonny can, however, and I was able to get the demo running again by
> loading it then saving it back out. https://thonny.org/
> Remember, even if hard tabs are set to four spaces, they are still tabs,
> and the extra invisible characters will cause Python to fail/throw
> exceptions/generally misbehave - even though you see the right amount of
> whitespace.
> 4a) If you want your code to run on the board, you must rename the Python
> file to code.py - this will autoexecute on boot.
> 5) Literally today, in the wee hours of the morning, the Circuit Express
> Playground library was updated to match the firmware version 3.0 :
> https://github.com/adafruit/Adafruit_CircuitPython_Bundle
> https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20180731
> <-- this has the bundles containing all of the things - if you followed the
> firmware update instructions given at the presentation, the link you want
> is the "3.x" link :
> https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/download/20180731/adafruit-circuitpython-bundle-3.x-mpy-20180731.zip
> Once unzipped, you can literally just drag and drop this folder onto the
> existing lib folder on the board and overwrite everything - there will
> still be ~1.2 MB of free space left over.
> I really appreciate learning that the board had both wav playback and two
> buttons - now I can finish my Pomodoro timer project !
> 6) In case I forget - there is a dojo meeting every Thursday night from
> ~6p-9p at the Smokehouse Brewing Company :
> https://www.smokehousebrewing.com/
> 1130 Dublin Road Columbus, Ohio 43215
> Thanks again to Neil, Kattni, and Pillar for hosting.
> Oh, and RSVP here for the next monthly meeting - but only if you like
> pizza : https://www.meetup.com/Central-Ohio-Python-Users-Group/
> - Damien Calloway
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> https://mail.python.org/mailman/listinfo/centraloh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20180801/feaf62ef/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 142872 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/centraloh/attachments/20180801/feaf62ef/attachment-0001.png>

More information about the CentralOH mailing list