Added SPDX to 30 more files - spdx-31

This commit is contained in:
dherrada 2022-02-23 13:10:19 -05:00
parent bfe5427a4a
commit 941a9baa3c
30 changed files with 226 additions and 106 deletions

View file

@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2015 Hristo Gochkov
//
// SPDX-License-Identifier: LGPL-2.1-or-later
/* /*
TFT SPI Flash Server - Example WebServer with internal SPI flash storage TFT SPI Flash Server - Example WebServer with internal SPI flash storage
for Adafruit ESP32-S2 TFT Feather for Adafruit ESP32-S2 TFT Feather

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
CircuitPython Capacitive Touch Pad Example - Print to the serial console when one pad is touched. CircuitPython Capacitive Touch Pad Example - Print to the serial console when one pad is touched.
""" """

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
CircuitPython Capacitive Two Touch Pad Example - Print to the serial console when a pad is touched. CircuitPython Capacitive Two Touch Pad Example - Print to the serial console when a pad is touched.
""" """

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
CircuitPython NeoPixel Blink example - blinking the built-in NeoPixels. CircuitPython NeoPixel Blink example - blinking the built-in NeoPixels.
""" """

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
NeoPixel brightness proximity example. Increases the brightness of the NeoPixels as you move closer NeoPixel brightness proximity example. Increases the brightness of the NeoPixels as you move closer
to the proximity sensor. to the proximity sensor.

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
Proximity spacebar dino game example. Sends a space when you move your hand close to the proximity Proximity spacebar dino game example. Sends a space when you move your hand close to the proximity
sensor and turns the LEDs on to let you know you're in the right range. For use with the Chrome sensor and turns the LEDs on to let you know you're in the right range. For use with the Chrome

View file

@ -1,106 +1,110 @@
#include <Adafruit_NeoPixel.h> // SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#include "Adafruit_FreeTouch.h" //
#include "Adafruit_APDS9960.h" // SPDX-License-Identifier: MIT
#include <Adafruit_NeoPixel.h>
// Create the neopixel strip with the built in definitions NUM_NEOPIXEL and PIN_NEOPIXEL #include "Adafruit_FreeTouch.h"
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_NEOPIXEL, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800); #include "Adafruit_APDS9960.h"
int16_t neo_brightness = 20; // initialize with 20 brightness (out of 255)
// Create the two touch pads on pins 1 and 2: // Create the neopixel strip with the built in definitions NUM_NEOPIXEL and PIN_NEOPIXEL
Adafruit_FreeTouch qt_1 = Adafruit_FreeTouch(1, OVERSAMPLE_4, RESISTOR_50K, FREQ_MODE_NONE); Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_NEOPIXEL, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
Adafruit_FreeTouch qt_2 = Adafruit_FreeTouch(2, OVERSAMPLE_4, RESISTOR_50K, FREQ_MODE_NONE); int16_t neo_brightness = 20; // initialize with 20 brightness (out of 255)
Adafruit_APDS9960 apds; // Create the two touch pads on pins 1 and 2:
Adafruit_FreeTouch qt_1 = Adafruit_FreeTouch(1, OVERSAMPLE_4, RESISTOR_50K, FREQ_MODE_NONE);
void setup() { Adafruit_FreeTouch qt_2 = Adafruit_FreeTouch(2, OVERSAMPLE_4, RESISTOR_50K, FREQ_MODE_NONE);
Serial.begin(9600);
//while (!Serial); Adafruit_APDS9960 apds;
strip.begin(); void setup() {
strip.setBrightness(neo_brightness); Serial.begin(9600);
strip.show(); // Initialize all pixels to 'off' //while (!Serial);
if (! qt_1.begin()) strip.begin();
Serial.println("Failed to begin qt on pin 1"); strip.setBrightness(neo_brightness);
if (! qt_2.begin()) strip.show(); // Initialize all pixels to 'off'
Serial.println("Failed to begin qt on pin 2");
if (! qt_1.begin())
pinMode(PIN_INTERRUPT, INPUT_PULLUP); Serial.println("Failed to begin qt on pin 1");
if(!apds.begin()){ if (! qt_2.begin())
Serial.println("failed to initialize device! Please check your wiring."); Serial.println("Failed to begin qt on pin 2");
while (1) {
strip.fill(0xFF0000); pinMode(PIN_INTERRUPT, INPUT_PULLUP);
strip.show(); if(!apds.begin()){
delay(100); Serial.println("failed to initialize device! Please check your wiring.");
strip.fill(0x00); while (1) {
strip.show(); strip.fill(0xFF0000);
delay(100); strip.show();
} delay(100);
} strip.fill(0x00);
strip.show();
Serial.println("APDS initialized!"); delay(100);
apds.enableProximity(true); }
apds.setProxGain(APDS9960_PGAIN_8X); }
apds.setLED(APDS9960_LEDDRIVE_100MA, APDS9960_LEDBOOST_300PCNT);
apds.setProxPulse(APDS9960_PPULSELEN_16US, 1); Serial.println("APDS initialized!");
apds.enableProximity(true);
//set the interrupt threshold to fire when proximity reading goes above 2 apds.setProxGain(APDS9960_PGAIN_8X);
apds.setProximityInterruptThreshold(0, 2); apds.setLED(APDS9960_LEDDRIVE_100MA, APDS9960_LEDBOOST_300PCNT);
apds.enableProximityInterrupt(); apds.setProxPulse(APDS9960_PPULSELEN_16US, 1);
}
//set the interrupt threshold to fire when proximity reading goes above 2
uint8_t j=0; apds.setProximityInterruptThreshold(0, 2);
apds.enableProximityInterrupt();
void loop() { }
// print the proximity reading when the interrupt pin goes low uint8_t j=0;
if (!digitalRead(PIN_INTERRUPT)){
uint16_t prox = apds.readProximity(); void loop() {
Serial.print("Proximity: ");
Serial.println(prox); // print the proximity reading when the interrupt pin goes low
if (!digitalRead(PIN_INTERRUPT)){
if (prox < 3) prox = 0; // ignore 1 and 2 readings uint16_t prox = apds.readProximity();
strip.setBrightness(prox); Serial.print("Proximity: ");
Serial.println(prox);
//clear the interrupt
apds.clearInterrupt(); if (prox < 3) prox = 0; // ignore 1 and 2 readings
} else { strip.setBrightness(prox);
strip.setBrightness(0);
} //clear the interrupt
apds.clearInterrupt();
strip.fill(Wheel(j)); } else {
strip.show(); strip.setBrightness(0);
}
// measure the captouches
uint16_t touch1 = qt_1.measure(); strip.fill(Wheel(j));
uint16_t touch2 = qt_2.measure(); strip.show();
// If the first pad is touched, go forward // measure the captouches
if (touch1 > 500) { uint16_t touch1 = qt_1.measure();
Serial.println("QT 1 touched"); uint16_t touch2 = qt_2.measure();
j++;
} // If the first pad is touched, go forward
if (touch1 > 500) {
// If the second pad is touched, go backward Serial.println("QT 1 touched");
if (touch2 > 500) { j++;
Serial.println("QT 2 touched"); }
j--;
} // If the second pad is touched, go backward
if (touch2 > 500) {
delay(10); Serial.println("QT 2 touched");
} j--;
}
// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r. delay(10);
uint32_t Wheel(byte WheelPos) { }
if(WheelPos < 85) {
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0); // Input a value 0 to 255 to get a color value.
} else if(WheelPos < 170) { // The colours are a transition r - g - b - back to r.
WheelPos -= 85; uint32_t Wheel(byte WheelPos) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3); if(WheelPos < 85) {
} else { return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
WheelPos -= 170; } else if(WheelPos < 170) {
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3); WheelPos -= 85;
} return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} } else {
WheelPos -= 170;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018 Anne Barela for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# Blues Playground Instrument # Blues Playground Instrument
# 2018-06-19 v03 # 2018-06-19 v03

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018 Mikey Sklar for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time import time
import adafruit_CCS811 import adafruit_CCS811

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 John Park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# Bonsai Buckaroo + CLUE Plant Care Bot # Bonsai Buckaroo + CLUE Plant Care Bot
import time import time

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2019 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import random import random
import board import board
import neopixel import neopixel

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2021 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
Prop-Maker based Darksaber Prop-Maker based Darksaber
Adapted from the Prop-Maker based Master Sword code Adapted from the Prop-Maker based Master Sword code

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018 Isaac Wellish for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# Author: Isaac Wellish # Author: Isaac Wellish
# Code adapted from Tony Dicola's CircuitPython code using the DS18x20 temp sensor # Code adapted from Tony Dicola's CircuitPython code using the DS18x20 temp sensor
# as well as John Park's CircuitPython code determining soil moisture from nails # as well as John Park's CircuitPython code determining soil moisture from nails

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 Andy Doro for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# AUTOCHEER DEVICE # AUTOCHEER DEVICE
# code by Andy Doro # code by Andy Doro
# #

View file

@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2020 Andy Doro for Adafruit Industries
//
// SPDX-License-Identifier: MIT
/* /*
AUTOCHEER DEVICE AUTOCHEER DEVICE
--- ---

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2019 Dave Astels for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
IoT environmental sensor node. IoT environmental sensor node.

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2019 Dave Astels for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
IoT environmental sensor node. IoT environmental sensor node.

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2019 Dave Astels for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
IoT environmental sensor node. IoT environmental sensor node.

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2019 Dave Astels for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
IoT environmental sensor node. IoT environmental sensor node.

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2019 Dave Astels for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# This file is where you keep secret settings, passwords, and tokens! # This file is where you keep secret settings, passwords, and tokens!
# If you put them in the code you risk committing that info or sharing it # If you put them in the code you risk committing that info or sharing it

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 John Park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# MP3 playback with tap trigger # MP3 playback with tap trigger
# Works on Feather M4 (or other M4 based boards) with Propmaker # Works on Feather M4 (or other M4 based boards) with Propmaker
import time import time

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import board import board
import digitalio import digitalio
import neopixel import neopixel

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 John Park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# ON AIR sign for YouTube livestreaming # ON AIR sign for YouTube livestreaming
# Runs on Airlift Metro M4 with 64x32 RGB Matrix display & shield # Runs on Airlift Metro M4 with 64x32 RGB Matrix display & shield

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2020 John Park for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# Metro Matrix Clock # Metro Matrix Clock
# Runs on Airlift Metro M4 with 64x32 RGB Matrix display & shield # Runs on Airlift Metro M4 with 64x32 RGB Matrix display & shield

View file

@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2018 Erin St Blaine for Adafruit Industries
//
// SPDX-License-Identifier: MIT
// Code by Erin St. Blaine for Adafruit Industries // Code by Erin St. Blaine for Adafruit Industries
// NeoPixel Aquarium Tutorial: https://learn.adafruit.com/neopixel-aquarium-with-submersible-lights/ // NeoPixel Aquarium Tutorial: https://learn.adafruit.com/neopixel-aquarium-with-submersible-lights/
// For QT Py board // For QT Py board

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2019 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT
""" """
This is a Conference Badge type Name Tag that is intended to be displayed on This is a Conference Badge type Name Tag that is intended to be displayed on
the PyBadge. Feel free to customize it to your heart's content. the PyBadge. Feel free to customize it to your heart's content.

View file

@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2017 Limor Fried for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#include <Adafruit_NeoPixel.h> #include <Adafruit_NeoPixel.h>
#define N_PIXELS 12 // Number of pixels you are using #define N_PIXELS 12 // Number of pixels you are using

View file

@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2017 Limor Fried for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import array import array
from rainbowio import colorwheel from rainbowio import colorwheel
import board import board

View file

@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2019 Melissa LeBlanc-Williams for Adafruit Industries
//
// SPDX-License-Identifier: MIT
// Message Panel // Message Panel
// Reads an Adafruit IO Feed, then formats and displays the message // Reads an Adafruit IO Feed, then formats and displays the message
// Author: Melissa LeBlanc-Williams // Author: Melissa LeBlanc-Williams

View file

@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2019 Melissa LeBlanc-Williams for Adafruit Industries
//
// SPDX-License-Identifier: MIT
/************************ Adafruit IO Config *******************************/ /************************ Adafruit IO Config *******************************/
// visit io.adafruit.com if you need to create an account, // visit io.adafruit.com if you need to create an account,