Skip to content

Commit fc3080c

Browse files
authored
Merge branch 'main' into spdx_-3
2 parents 9bd68ff + 8b2e3c8 commit fc3080c

File tree

108 files changed

+11349
-124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+11349
-124
lines changed

.github/workflows/githubci.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
arduino-platform: ["uno", "nrf52832", "cpx_ada", "pyportal", "protrinket_3v", "protrinket_5v", "metro_m0", "esp8266", "esp32", "trinket_3v", "gemma", "flora", "feather32u4", "feather_m0_express", "gemma_m0", "trinket_m0", "hallowing_m0", "monster_m4sk", "hallowing_m4", "hallowing_m4_tinyusb", "neotrellis_m4", "pybadge", "cpb", "cpc", "funhouse", "magtag"]
11-
# "trinket_5v", was removed
10+
arduino-platform: ["cpb", "cpc", "cpx_ada", "esp32", "esp8266", "feather32u4", "feather_m0_express", "feather_m4_express", "feather_rp2040", "flora", "funhouse", "gemma", "gemma_m0", "hallowing_m0", "hallowing_m4_tinyusb", "magtag", "metro_m0", "metro_m0_tinyusb", "metro_m4", "metro_m4_tinyusb", "monster_m4sk", "monster_m4sk_tinyusb", "neokeytrinkey_m0", "neotrellis_m4", "nrf52832", "nrf52840", "protrinket_5v", "proxlighttrinkey_m0", "pybadge", "pygamer", "pyportal", "qt2040_trinkey", "qtpy_m0", "rotarytrinkey_m0", "slidetrinkey_m0", "trinket_m0", "uno", "trinket_5v", "ledglasses_nrf52840" ]
1211
runs-on: ubuntu-18.04
1312

1413
steps:
@@ -39,6 +38,34 @@ jobs:
3938
- name: test platforms
4039
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
4140

41+
- name: Upload build artifacts
42+
uses: actions/upload-artifact@v2
43+
with:
44+
name: ${{ github.event.repository.name }}.${{ github.sha }}
45+
path: |
46+
build/*.hex
47+
build/*.bin
48+
build/*.uf2
49+
50+
- name: Zip release files
51+
if: startsWith(github.ref, 'refs/tags/')
52+
run: |
53+
if [ -d build ]; then
54+
(
55+
echo "Built from Adafruit Learning System Guides `git describe --tags` for ${{ matrix.arduino-platform }}"
56+
echo "Source code: https://github.com/adafruit/"
57+
echo "Adafruit Learning System: https://learn.adafruit.com/"
58+
) > build/README.txt
59+
cd build && zip -9 -o ${{ matrix.arduino-platform }}.zip *.hex *.bin *.uf2 *.txt
60+
fi
61+
62+
- name: Create release
63+
if: startsWith(github.ref, 'refs/tags/')
64+
uses: softprops/action-gh-release@v1
65+
with:
66+
files: build/${{ matrix.arduino-platform }}.zip
67+
fail_on_unmatched_files: false
68+
body: "Select the zip file corresponding to your board from the list below."
4269

4370
pylint:
4471
runs-on: ubuntu-latest

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ confidence=
5252
# no Warning level messages displayed, use"--disable=all --enable=classes
5353
# --disable=W"
5454
# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
55-
disable=too-many-instance-attributes,len-as-condition,too-few-public-methods,anomalous-backslash-in-string,no-else-return,simplifiable-if-statement,too-many-arguments,duplicate-code,no-name-in-module,no-member,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,missing-docstring,invalid-name,bad-whitespace,consider-using-enumerate,unexpected-keyword-arg
55+
disable=too-many-instance-attributes,len-as-condition,too-few-public-methods,anomalous-backslash-in-string,no-else-return,simplifiable-if-statement,too-many-arguments,duplicate-code,no-name-in-module,no-member,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,missing-docstring,invalid-name,bad-whitespace,consider-using-enumerate,unexpected-keyword-arg,consider-using-f-string
5656

5757
# Enable the message, report, category or checker with the given id(s). You can
5858
# either give multiple identifier separated by comma (,) or put this option
File renamed without changes.

2020_shake/2020.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# SPDX-FileCopyrightText: 2020 Limor Fried for Adafruit Industries
2-
#
3-
# SPDX-License-Identifier: MIT
1+
// SPDX-FileCopyrightText: 2020 Limor Fried for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
44

55
#define BITMAP_WIDTH 64
66
#define BITMAP_HEIGHT 32

2020_shake/2020_shake.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# SPDX-FileCopyrightText: 2020 Limor Fried for Adafruit Industries
2-
#
3-
# SPDX-License-Identifier: MIT
1+
// SPDX-FileCopyrightText: 2020 Limor Fried for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
44

55
#include <Adafruit_LIS3DH.h> // For accelerometer
66
#include <Adafruit_PixelDust.h> // For simulation

2020_shake/2021.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# SPDX-FileCopyrightText: 2020 Limor Fried for Adafruit Industries
2-
#
3-
# SPDX-License-Identifier: MIT
1+
// SPDX-FileCopyrightText: 2020 Limor Fried for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
44

55
const uint8_t PROGMEM bitmap_2021[] = {
66
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

3D_Printed_Bionic_Eye/3D_Printed_Bionic_Eye.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-FileCopyrightText: 2018 Bill Earl and Mikey Sklar for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
14
/*******************************************************************
25
Bionic Eye sketch for Adafruit Trinket.
36

3D_Printed_Bionic_Eye/code.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2018 Bill Earl and Mikey Sklar for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
#
15
# Bionic Eye sketch for Adafruit Trinket.
26
#
37
# written by Bill Earl for Arduino

3D_Printed_Daft_Punk_Helmet/3D_Printed_Daft_Punk_Helmet-Front-Animation.ino renamed to 3D_Printed_Daft_Punk_Helmet/3D_Printed_Daft_Punk_Helmet-Front-Animation/3D_Printed_Daft_Punk_Helmet-Front-Animation.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-FileCopyrightText: 2014 Phil Burgess for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
4+
//
15
// Fiery demon horns (rawr!) for Adafruit Trinket/Gemma.
26
// Adafruit invests time and resources providing this open source code,
37
// please support Adafruit and open-source hardware by purchasing
@@ -26,7 +30,7 @@ struct {
2630
long fade; // Decreases brightness as wave moves
2731

2832
// Gamma correction improves appearance of midrange colors
29-
uint8_t gamma[] PROGMEM = {
33+
const uint8_t gamma[] PROGMEM = {
3034
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3135
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
3236
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,

3D_Printed_Daft_Punk_Helmet/3D_Printed_Daft_Punk_Helmet-Front-Animation/code.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2014 Phil Burgess for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# Fiery demon horns (rawr!) for Adafruit Trinket/Gemma.
26
# Adafruit invests time and resources providing this open source code,
37
# please support Adafruit and open-source hardware by purchasing

3D_Printed_Daft_Punk_Helmet/3D_Printed_Daft_Punk_Helmet-Side-Animation.ino renamed to 3D_Printed_Daft_Punk_Helmet/3D_Printed_Daft_Punk_Helmet-Side-Animation/3D_Printed_Daft_Punk_Helmet-Side-Animation.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-FileCopyrightText: 2014 Phil Burgess for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
4+
15
// Adafruit Trinket+NeoPixel animation for Daft Punk-inspired helmet.
26
// Contains some ATtiny85-specific stuff; won't run as-is on Uno, etc.
37

3D_Printed_Daft_Punk_Helmet/3D_Printed_Daft_Punk_Helmet-Side-Animation/code.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2014 Phil Burgess for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# Adafruit Trinket+NeoPixel animation for Daft Punk-inspired helmet.
26
# Contains some ATtiny85-specific stuff; won't run as-is on Uno, etc.
37

3D_Printed_Guardian_Sword/3D_Printed_Guardian_Sword.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-FileCopyrightText: 2018 Mikey Sklar for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
4+
15
#include <Adafruit_NeoPixel.h>
26
#ifdef __AVR__
37
#include <avr/power.h>

3D_Printed_LED_Fire_Horns/3D_Printed_LED_Fire_Horns.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// SPDX-FileCopyrightText: 2017 Phil Burgess for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
4+
15
// Fiery demon horns (rawr!) for Adafruit Trinket/Gemma.
26
// Adafruit invests time and resources providing this open source code,
37
// please support Adafruit and open-source hardware by purchasing

3D_Printed_LED_Fire_Horns/code.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2018 Phil Burgess and Mikey Sklar for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
# Fiery demon horns (rawr!) for Adafruit Trinket/Gemma.
26
# Adafruit invests time and resources providing this open source code,
37
# please support Adafruit and open-source hardware by purchasing

3D_Printed_LED_Microphone_Flag/.circuitpython.skip

Lines changed: 0 additions & 1 deletion
This file was deleted.

3D_Printed_LED_Microphone_Flag/code.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ def fscale(originalmin, originalmax, newbegin, newend, inputvalue, curve):
120120

121121
def drawLine(fromhere, to):
122122
if fromhere > to:
123-
fromheretemp = fromhere
124-
fromhere = to
125-
to = fromheretemp
123+
to, fromhere = fromhere, to
126124

127125
for index in range(fromhere, to):
128126
strip[index] = (0, 0, 0)

ABC_Soundboards_for_NeoTrellis/code.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2020 Anne Barela for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
#
15
# Talking A, B, Cs Soundboards: Animal ABCs and "E is for Electronics" ABCs
26

37
import time
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
// SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
2+
//
3+
// SPDX-License-Identifier: MIT
4+
5+
#include <Adafruit_NeoPixel.h>
6+
#include <RotaryEncoder.h>
7+
8+
#define PIN_ENCODER_A 13
9+
#define PIN_ENCODER_B 12
10+
#define COM_A 11
11+
#define COM_B SDA
12+
#define BUTTON_UP 5
13+
#define BUTTON_LEFT SCL
14+
#define BUTTON_DOWN 9
15+
#define BUTTON_RIGHT 6
16+
#define BUTTON_IN 10
17+
18+
RotaryEncoder encoder(PIN_ENCODER_A, PIN_ENCODER_B, RotaryEncoder::LatchMode::TWO03);
19+
// This interrupt will do our encoder reading/checking!
20+
void checkPosition() {
21+
encoder.tick(); // just call tick() to check the state.
22+
}
23+
int last_rotary = 0;
24+
25+
26+
#define NUMPIXELS 12
27+
Adafruit_NeoPixel pixels(NUMPIXELS, A0, NEO_GRB + NEO_KHZ800);
28+
29+
30+
void setup(void) {
31+
Serial.begin(115200);
32+
while (!Serial);
33+
Serial.println("ANO Rotary Encoder Demo");
34+
35+
pinMode(COM_A, OUTPUT);
36+
digitalWrite(COM_A, LOW);
37+
pinMode(COM_B, OUTPUT);
38+
digitalWrite(COM_B, LOW);
39+
40+
attachInterrupt(PIN_ENCODER_A, checkPosition, CHANGE);
41+
attachInterrupt(PIN_ENCODER_B, checkPosition, CHANGE);
42+
43+
pinMode(BUTTON_UP, INPUT_PULLUP);
44+
pinMode(BUTTON_DOWN, INPUT_PULLUP);
45+
pinMode(BUTTON_LEFT, INPUT_PULLUP);
46+
pinMode(BUTTON_RIGHT, INPUT_PULLUP);
47+
pinMode(BUTTON_IN, INPUT_PULLUP);
48+
pixels.begin();
49+
pixels.setBrightness(30);
50+
pixels.show();
51+
}
52+
53+
54+
void loop(void) {
55+
// read encoder
56+
int curr_rotary = encoder.getPosition();
57+
RotaryEncoder::Direction direction = encoder.getDirection();
58+
59+
pixels.clear();
60+
if (curr_rotary != last_rotary) {
61+
Serial.print("Encoder value: ");
62+
Serial.print(curr_rotary);
63+
Serial.print(" direction: ");
64+
Serial.println((int)direction);
65+
}
66+
last_rotary = curr_rotary;
67+
68+
pixels.setPixelColor((curr_rotary + (1000*NUMPIXELS)) % NUMPIXELS, pixels.Color(0, 150, 0));
69+
70+
if (! digitalRead(BUTTON_UP)) {
71+
pixels.setPixelColor(0, pixels.Color(150, 0, 0));
72+
}
73+
if (! digitalRead(BUTTON_LEFT)) {
74+
pixels.setPixelColor(NUMPIXELS/4, pixels.Color(150, 0, 0));
75+
}
76+
if (! digitalRead(BUTTON_DOWN)) {
77+
pixels.setPixelColor(NUMPIXELS/2, pixels.Color(150, 0, 0));
78+
}
79+
if (! digitalRead(BUTTON_RIGHT)) {
80+
pixels.setPixelColor(NUMPIXELS*3/4, pixels.Color(150, 0, 0));
81+
}
82+
if (! digitalRead(BUTTON_IN)) {
83+
pixels.fill(pixels.Color(50, 50, 50));
84+
}
85+
pixels.show();
86+
87+
delay(20);
88+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
"""
6+
CircuitPython ANO Rotary Encoder and NeoPixel Ring example.
7+
"""
8+
import board
9+
import digitalio
10+
import rotaryio
11+
import neopixel
12+
13+
# The pin assignments for the breakout pins. Update this is you are not using a Feather.
14+
ENCA = board.D13
15+
ENCB = board.D12
16+
COMA = board.D11
17+
SW1 = board.D10
18+
SW2 = board.D9
19+
SW3 = board.D6
20+
SW4 = board.D5
21+
SW5 = board.SCL
22+
COMB = board.SDA
23+
24+
# Rotary encoder setup
25+
encoder = rotaryio.IncrementalEncoder(ENCA, ENCB)
26+
last_position = None
27+
28+
# NeoPixel ring setup. Update num_pixels if using a different ring.
29+
num_pixels = 12
30+
pixels = neopixel.NeoPixel(board.A0, num_pixels, auto_write=False)
31+
32+
# Set the COMA and COMB pins LOW. This is only necessary when using the direct-to-Feather or other
33+
# GPIO-based wiring method. If connecting COMA and COMB to ground, you do not need to include this.
34+
com_a = digitalio.DigitalInOut(COMA)
35+
com_a.switch_to_output()
36+
com_a = False
37+
com_b = digitalio.DigitalInOut(COMB)
38+
com_b.switch_to_output()
39+
com_b = False
40+
41+
# Button pin setup
42+
button_pins = (SW1, SW2, SW3, SW4, SW5)
43+
buttons = []
44+
for button_pin in button_pins:
45+
pin = digitalio.DigitalInOut(button_pin)
46+
pin.switch_to_input(digitalio.Pull.UP)
47+
buttons.append(pin)
48+
49+
while True:
50+
position = encoder.position
51+
if last_position is None or position != last_position:
52+
print("Position: {}".format(position))
53+
last_position = position
54+
55+
pixels.fill((0, 0, 0))
56+
pixels[position % num_pixels] = (0, 150, 0)
57+
58+
if not buttons[0].value:
59+
print("Center button!")
60+
pixels.fill((100, 100, 100))
61+
62+
if not buttons[1].value:
63+
print("Up button!")
64+
pixels[0] = (150, 0 ,0)
65+
66+
if not buttons[2].value:
67+
print("Left button!")
68+
pixels[3] = (150, 0, 0)
69+
70+
if not buttons[3].value:
71+
print("Down button!")
72+
pixels[6] = (150, 0, 0)
73+
74+
if not buttons[4].value:
75+
print("Right button!")
76+
pixels[9] = (150, 0, 0)
77+
78+
pixels.show()

Adafruit_Prop_Maker_FeatherWing/Prop_Maker_LED_Simpletest/Prop_Maker_LED_Simpletest.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
* Rainbow swirl example for 3W LED.
66
*/
77

8-
#if defined(__SAMD21G18A__) || defined(__AVR_ATmega32U4__)
8+
#ifdef USE_TINYUSB // For Serial when selecting TinyUSB
9+
#include <Adafruit_TinyUSB.h>
10+
#endif
11+
12+
#if defined(__SAMD21G18A__) || defined(__AVR_ATmega32U4__) || defined(NRF52840_XXAA)
913
// No green PWM on 32u4
1014
#define POWER_PIN 10
1115
#define RED_LED 11

Adafruit_Prop_Maker_FeatherWing/Prop_Maker_NeoPixel_Simpletest/Prop_Maker_NeoPixel_Simpletest.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
*/
77
#include <Adafruit_NeoPixel.h>
88

9+
#ifdef USE_TINYUSB // For Serial when selecting TinyUSB
10+
#include <Adafruit_TinyUSB.h>
11+
#endif
12+
913
// NeoPixel strip length, in pixels
1014
#define NUM_PIXELS 30
1115

12-
#if defined(__SAMD21G18A__) || defined(__AVR_ATmega32U4__)
16+
#if defined(__SAMD21G18A__) || defined(__AVR_ATmega32U4__) || defined(NRF52840_XXAA)
1317
#define NEOPIXEL_PIN 5
1418
#define POWER_PIN 10
1519
#elif defined(__AVR_ATmega328P__)

Adafruit_Prop_Maker_FeatherWing/Prop_Maker_Switch_Simpletest/Prop_Maker_Switch_Simpletest.ino

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
* Print to the Serial Montior when a switch is pressed.
66
*/
77

8-
#if defined(__SAMD21G18A__) || defined(__AVR_ATmega32U4__)
8+
#ifdef USE_TINYUSB // For Serial when selecting TinyUSB
9+
#include <Adafruit_TinyUSB.h>
10+
#endif
11+
12+
#if defined(__SAMD21G18A__) || defined(__AVR_ATmega32U4__) || defined(NRF52840_XXAA)
913
#define SWITCH_PIN 9
1014
#elif defined(__AVR_ATmega328P__)
1115
#define SWITCH_PIN 9
File renamed without changes.

0 commit comments

Comments
 (0)