You can get really good official docs here now https://github.com/adafruit/circuitpython/tree/main/ports/espressif
Below are the old notes (19 Oct 2020)
| # Adapted from Sandy J Macdonald's gist at https://gist.github.com/sandyjmacdonald/b465377dc11a8c83a8c40d1c9b990a90 to configure all buttons and switch off all lights in loop | |
| import time | |
| import board | |
| import busio | |
| import usb_hid | |
| from adafruit_bus_device.i2c_device import I2CDevice | |
| import adafruit_dotstar |
| import time | |
| import board | |
| import busio | |
| import usb_midi | |
| import adafruit_midi | |
| from adafruit_midi.note_off import NoteOff | |
| from adafruit_midi.note_on import NoteOn | |
| from adafruit_bus_device.i2c_device import I2CDevice | |
| import adafruit_dotstar |
| ```brew install openocd``` | |
| make a file called openocd.cfg in a folder containing... | |
| # Atmel-ICE JTAG/SWD in-circuit debugger. | |
| interface cmsis-dap | |
| # Chip info | |
| set CHIPNAME at91samd21g18 | |
| source [find target/at91samdXX.cfg] |
You can get really good official docs here now https://github.com/adafruit/circuitpython/tree/main/ports/espressif
Below are the old notes (19 Oct 2020)
| import sys, os | |
| import shutil | |
| import math | |
| import itertools | |
| from copy import deepcopy | |
| # 0 1 2 3 4 5 6 | |
| LIST_elmt = [" ("," (start ",") (end ",") "," (layer ",") ","))"] | |
| #LIST_elmt = [" (gr_line (start 131.571908 182.314571) (end 112.874456 120.68499) (angle 90) (layer Dwgs.User) (width 0.1))"] | |
| #LIST_elmt = [" (segment (start 118.7 106.7) (end 119.4 106.7) (width 0.25) (layer B.Cu) (net 0))"] |
I have modified the force-multi-foci example to add a convex hull around each cluster of nodes.
I achieved this by using d3.nest() to create a new dataset of clusters containing the nodes in each cluster. Then in the tick() method I create and update the path element for each cluster in this dataset.