├── Libraries ├── FastLED-master │ ├── fastspi_dma.h │ ├── .gitignore │ ├── extras │ │ ├── RainbowDemo.bin.zip │ │ ├── AppleII.s65 │ │ └── RainbowDemo.s65 │ ├── platforms │ │ ├── esp │ │ │ └── 8266 │ │ │ │ ├── fastled_esp8266.h │ │ │ │ └── led_sysdefs_esp8266.h │ │ ├── arm │ │ │ ├── d21 │ │ │ │ ├── fastled_arm_d21.h │ │ │ │ ├── led_sysdefs_arm_d21.h │ │ │ │ └── clockless_arm_d21.h │ │ │ ├── kl26 │ │ │ │ ├── fastled_arm_kl26.h │ │ │ │ ├── led_sysdefs_arm_kl26.h │ │ │ │ └── clockless_arm_kl26.h │ │ │ ├── stm32 │ │ │ │ ├── fastled_arm_stm32.h │ │ │ │ └── led_sysdefs_arm_stm32.h │ │ │ ├── nrf51 │ │ │ │ ├── fastled_arm_nrf51.h │ │ │ │ ├── led_sysdefs_arm_nrf51.h │ │ │ │ └── clockless_arm_nrf51.h │ │ │ ├── sam │ │ │ │ ├── fastled_arm_sam.h │ │ │ │ └── led_sysdefs_arm_sam.h │ │ │ ├── k20 │ │ │ │ ├── fastled_arm_k20.h │ │ │ │ ├── led_sysdefs_arm_k20.h │ │ │ │ ├── smartmatrix_t3.h │ │ │ │ └── octows2811_controller.h │ │ │ └── k66 │ │ │ │ ├── fastled_arm_k66.h │ │ │ │ └── led_sysdefs_arm_k66.h │ │ └── avr │ │ │ ├── fastled_avr.h │ │ │ └── led_sysdefs_avr.h │ ├── docs │ │ └── mainpage.dox │ ├── cpp_compat.h │ ├── library.properties │ ├── examples │ │ ├── RGBSetDemo │ │ │ └── RGBSetDemo.ino │ │ ├── Multiple │ │ │ ├── OctoWS2811Demo │ │ │ │ └── OctoWS2811Demo.ino │ │ │ ├── MultipleStripsInOneArray │ │ │ │ └── MultipleStripsInOneArray.ino │ │ │ ├── ArrayOfLedArrays │ │ │ │ └── ArrayOfLedArrays.ino │ │ │ ├── MirroringSample │ │ │ │ └── MirroringSample.ino │ │ │ ├── ParallelOutputDemo │ │ │ │ └── ParallelOutputDemo.ino │ │ │ └── MultiArrays │ │ │ │ └── MultiArrays.ino │ │ ├── Cylon │ │ │ └── Cylon.ino │ │ ├── AnalogOutput │ │ │ └── AnalogOutput.ino │ │ ├── NoisePlayground │ │ │ └── NoisePlayground.ino │ │ ├── Blink │ │ │ └── Blink.ino │ │ ├── Pintest │ │ │ └── Pintest.ino │ │ ├── RGBCalibrate │ │ │ └── RGBCalibrate.ino │ │ ├── ColorTemperature │ │ │ └── ColorTemperature.ino │ │ ├── FirstLight │ │ │ └── FirstLight.ino │ │ ├── Noise │ │ │ └── Noise.ino │ │ └── Fire2012 │ │ │ └── Fire2012.ino │ ├── preview_changes.txt │ ├── bitswap.cpp │ ├── library.json │ ├── platforms.h │ ├── LICENSE │ ├── led_sysdefs.h │ ├── fastspi_types.h │ ├── dmx.h │ ├── colorpalettes.h │ ├── PORTING.md │ ├── fastled_progmem.h │ ├── fastspi_nop.h │ ├── lib8tion │ │ └── random8.h │ ├── color.h │ ├── fastled_config.h │ ├── fastspi_ref.h │ ├── hsv2rgb.h │ └── power_mgt.h ├── Adafruit-GFX-Library-master │ ├── Img2Code │ │ ├── .gitignore │ │ ├── settings.gradle │ │ ├── src │ │ │ └── main │ │ │ │ └── resources │ │ │ │ └── Adafruit.png │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── build.gradle │ │ ├── README.md │ │ └── gradlew.bat │ ├── .gitignore │ ├── fontconvert │ │ ├── Makefile │ │ └── makefonts.sh │ ├── library.properties │ ├── gfxfont.h │ ├── license.txt │ ├── Adafruit_SPITFT.h │ └── README.md ├── LiquidCrystal_I2C-master │ ├── README.md │ ├── LiquidCrystal_I2C.o │ ├── library.json │ ├── library.properties │ ├── examples │ │ ├── HelloWorld │ │ │ └── HelloWorld.pde │ │ ├── SerialDisplay │ │ │ └── SerialDisplay.pde │ │ └── CustomChars │ │ │ └── CustomChars.pde │ └── keywords.txt ├── arduino-Max72xxPanel-master │ ├── README.pdf │ ├── keywords.txt │ ├── license.txt │ ├── examples │ │ ├── Spin │ │ │ └── Spin.pde │ │ ├── Ticker │ │ │ └── Ticker.pde │ │ ├── MadFly │ │ │ └── MadFly.pde │ │ └── Snake │ │ │ └── Snake.pde │ ├── README.md │ └── Max72xxPanel.h ├── FHT │ ├── cas_lookup_16.inc │ ├── 16_reorder.inc │ ├── hann_16.inc │ ├── 32_reorder.inc │ ├── cas_lookup_32.inc │ ├── hann_32.inc │ ├── 64_reorder.inc │ ├── cas_lookup_64.inc │ ├── hann_64.inc │ ├── keywords.txt │ ├── 128_reorder.inc │ ├── cas_lookup_128.inc │ ├── hann_128.inc │ ├── examples │ │ ├── fht_adc │ │ │ └── fht_adc.pde │ │ ├── fht_adc_serial │ │ │ └── fht_adc_serial.pde │ │ └── fht_codec │ │ │ └── fht_codec.pde │ ├── 256_reorder.inc │ ├── cas_lookup_256.inc │ ├── decibel.inc │ ├── hann_window.inc │ └── hann_256.inc ├── LedControl-master │ ├── library.properties │ ├── README.md │ ├── keywords.txt │ ├── LICENSE │ └── examples │ │ ├── LCDemoCascadedDevices │ │ └── LCDemoCascadedDevices.ino │ │ └── LCDemo7Segment │ │ └── LCDemo7Segment.ino └── LiquidCrystal │ ├── library.properties │ ├── keywords.txt │ ├── README.adoc │ ├── examples │ ├── Blink │ │ └── Blink.ino │ ├── Cursor │ │ └── Cursor.ino │ ├── Display │ │ └── Display.ino │ ├── HelloWorld │ │ └── HelloWorld.ino │ ├── SerialDisplay │ │ └── SerialDisplay.ino │ ├── Autoscroll │ │ └── Autoscroll.ino │ ├── setCursor │ │ └── setCursor.ino │ ├── TextDirection │ │ └── TextDirection.ino │ ├── Scroll │ │ └── Scroll.ino │ └── CustomCharacter │ │ └── CustomCharacter.ino │ └── src │ └── LiquidCrystal.h ├── .gitattributes ├── proj_img.jpg ├── Schemes ├── 1602.png ├── 8x32.png ├── simple.png └── ws2811.jpg └── Firmware └── spektrumFHT └── spektrumFHT.ino /Libraries/FastLED-master/fastspi_dma.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/.gitignore: -------------------------------------------------------------------------------- 1 | html/ 2 | *.gch 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/.gitignore: -------------------------------------------------------------------------------- 1 | build/** 2 | .gradle/** 3 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/.gitignore: -------------------------------------------------------------------------------- 1 | default.vim 2 | fontconvert/fontconvert 3 | -------------------------------------------------------------------------------- /proj_img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/proj_img.jpg -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'Img2Code' 2 | -------------------------------------------------------------------------------- /Schemes/1602.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Schemes/1602.png -------------------------------------------------------------------------------- /Schemes/8x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Schemes/8x32.png -------------------------------------------------------------------------------- /Schemes/simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Schemes/simple.png -------------------------------------------------------------------------------- /Schemes/ws2811.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Schemes/ws2811.jpg -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/README.md: -------------------------------------------------------------------------------- 1 | # LiquidCrystal_I2C 2 | LiquidCrystal Arduino library for the DFRobot I2C LCD displays 3 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Libraries/arduino-Max72xxPanel-master/README.pdf -------------------------------------------------------------------------------- /Libraries/FastLED-master/extras/RainbowDemo.bin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Libraries/FastLED-master/extras/RainbowDemo.bin.zip -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/LiquidCrystal_I2C.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Libraries/LiquidCrystal_I2C-master/LiquidCrystal_I2C.o -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/src/main/resources/Adafruit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Libraries/Adafruit-GFX-Library-master/Img2Code/src/main/resources/Adafruit.png -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexGyver/FHTSpectrumAnalyzer/HEAD/Libraries/Adafruit-GFX-Library-master/Img2Code/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Libraries/FHT/cas_lookup_16.inc: -------------------------------------------------------------------------------- 1 | // cas_lookup_16.inc 2 | // guest openmusiclabs.com 9.4.12 3 | // lookup values for cos and sin of 2(pi)k/N 4 | // first is cos second is sin 5 | 6 | 30274,12540, 7 | 23170,23170, 8 | 12540,30274, 9 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/esp/8266/fastled_esp8266.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "bitswap.h" 4 | #include "fastled_delay.h" 5 | #include "fastpin_esp8266.h" 6 | #include "clockless_esp8266.h" 7 | #include "clockless_block_esp8266.h" 8 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/d21/fastled_arm_d21.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_ARM_D21_H 2 | #define __INC_FASTLED_ARM_D21_H 3 | 4 | #include "fastled_delay.h" 5 | #include "fastpin_arm_d21.h" 6 | #include "clockless_arm_d21.h" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /Libraries/FHT/16_reorder.inc: -------------------------------------------------------------------------------- 1 | // 16_reorder.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // fft butterfly swap pairs 4 | // reorders input values for butterfly operations 5 | 6 | 12, 3, 7 | 14, 7, 8 | 13, 11, 9 | 8, 1, 10 | 10, 5, 11 | 4, 2, 12 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/docs/mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | @brief Documentation file for FastLED 3 | @author dgarcia at fastled dot io 4 | @file 5 | */ 6 | /** @defgroup FastLED Sources */ 7 | /** 8 | @mainpage FastLED - let there be light! 9 | */ 10 | EOF 11 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'java' 2 | apply plugin: 'eclipse' 3 | apply plugin: 'application' 4 | 5 | mainClassName = "Image2Code" 6 | 7 | jar { 8 | manifest { 9 | attributes 'Main-Class': 'Image2Code' 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Libraries/FHT/hann_16.inc: -------------------------------------------------------------------------------- 1 | // hann_16.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // lookup values for a hann window 4 | // signed 16b format 5 | 6 | 0, 7 | 1416, 8 | 5421, 9 | 11321, 10 | 18097, 11 | 24576, 12 | 29639, 13 | 32410, 14 | 32410, 15 | 29639, 16 | 24576, 17 | 18097, 18 | 11321, 19 | 5421, 20 | 1416, 21 | 0, 22 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/kl26/fastled_arm_kl26.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_ARM_KL26_H 2 | #define __INC_FASTLED_ARM_KL26_H 3 | 4 | // Include the k20 headers 5 | #include "fastled_delay.h" 6 | #include "fastpin_arm_kl26.h" 7 | #include "fastspi_arm_kl26.h" 8 | #include "clockless_arm_kl26.h" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Sep 05 10:24:57 EDT 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip 7 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/stm32/fastled_arm_stm32.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_ARM_SAM_H 2 | #define __INC_FASTLED_ARM_SAM_H 3 | 4 | // Include the sam headers 5 | #include "fastled_delay.h" 6 | #include "fastpin_arm_stm32.h" 7 | // #include "fastspi_arm_stm32.h" 8 | #include "clockless_arm_stm32.h" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /Libraries/FHT/32_reorder.inc: -------------------------------------------------------------------------------- 1 | // 32_reorder.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // fft butterfly swap pairs 4 | // reorders input values for butterfly operations 5 | 6 | 24, 3, 7 | 28, 7, 8 | 26, 11, 9 | 30, 15, 10 | 25, 19, 11 | 29, 23, 12 | 16, 1, 13 | 20, 5, 14 | 18, 9, 15 | 22, 13, 16 | 8, 2, 17 | 12, 6, 18 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/fontconvert/Makefile: -------------------------------------------------------------------------------- 1 | all: fontconvert 2 | 3 | CC = gcc 4 | CFLAGS = -Wall -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/include 5 | LIBS = -lfreetype 6 | 7 | fontconvert: fontconvert.c 8 | $(CC) $(CFLAGS) $< $(LIBS) -o $@ 9 | strip $@ 10 | 11 | clean: 12 | rm -f fontconvert 13 | -------------------------------------------------------------------------------- /Libraries/FHT/cas_lookup_32.inc: -------------------------------------------------------------------------------- 1 | // cas_lookup_32.inc 2 | // guest openmusiclabs.com 9.4.12 3 | // lookup values for cos and sin of 2(pi)k/N 4 | // first is cos second is sin 5 | 6 | 30274,12540, 7 | 23170,23170, 8 | 12540,30274, 9 | 32138,6393, 10 | 30274,12540, 11 | 27246,18205, 12 | 23170,23170, 13 | 18205,27246, 14 | 12540,30274, 15 | 6393,32138, 16 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/nrf51/fastled_arm_nrf51.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_ARM_NRF51_H 2 | #define __INC_FASTLED_ARM_NRF51_H 3 | 4 | // Include the k20 headers 5 | #include "bitswap.h" 6 | #include "fastled_delay.h" 7 | #include "fastpin_arm_nrf51.h" 8 | #include "fastspi_arm_nrf51.h" 9 | #include "clockless_arm_nrf51.h" 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/sam/fastled_arm_sam.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_ARM_SAM_H 2 | #define __INC_FASTLED_ARM_SAM_H 3 | 4 | // Include the sam headers 5 | #include "fastled_delay.h" 6 | #include "fastpin_arm_sam.h" 7 | #include "fastspi_arm_sam.h" 8 | #include "clockless_arm_sam.h" 9 | #include "clockless_block_arm_sam.h" 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/cpp_compat.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_CPP_COMPAT_H 2 | #define __INC_CPP_COMPAT_H 3 | 4 | #include "FastLED.h" 5 | 6 | #if __cplusplus <= 199711L 7 | 8 | #define static_assert(expression, message) 9 | #define constexpr const 10 | 11 | #else 12 | 13 | // things that we can turn on if we're in a C++11 environment 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/avr/fastled_avr.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_AVR_H 2 | #define __INC_FASTLED_AVR_H 3 | 4 | #include "fastled_delay.h" 5 | #include "fastpin_avr.h" 6 | #include "fastspi_avr.h" 7 | #include "clockless_trinket.h" 8 | 9 | // Default to using PROGMEM 10 | #ifndef FASTLED_USE_PROGMEM 11 | #define FASTLED_USE_PROGMEM 1 12 | #endif 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LiquidCrystal_I2C", 3 | "keywords": "LCD, liquidcrystal, I2C", 4 | "description": "A library for DFRobot I2C LCD displays", 5 | "repository": 6 | { 7 | "type": "git", 8 | "url": "https://github.com/marcoschwartz/LiquidCrystal_I2C.git" 9 | }, 10 | "frameworks": "arduino", 11 | "platforms": 12 | [ 13 | "atmelavr" 14 | ] 15 | } -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/k20/fastled_arm_k20.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_ARM_K20_H 2 | #define __INC_FASTLED_ARM_K20_H 3 | 4 | // Include the k20 headers 5 | #include "bitswap.h" 6 | #include "fastled_delay.h" 7 | #include "fastpin_arm_k20.h" 8 | #include "fastspi_arm_k20.h" 9 | #include "octows2811_controller.h" 10 | #include "smartmatrix_t3.h" 11 | #include "clockless_arm_k20.h" 12 | #include "clockless_block_arm_k20.h" 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/k66/fastled_arm_k66.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_ARM_K66_H 2 | #define __INC_FASTLED_ARM_K66_H 3 | 4 | // Include the k66 headers 5 | #include "bitswap.h" 6 | #include "fastled_delay.h" 7 | #include "fastpin_arm_k66.h" 8 | #include "fastspi_arm_k66.h" 9 | //#include "octows2811_controller.h" 10 | //#include "smartmatrix_t3.h" 11 | #include "clockless_arm_k66.h" 12 | #include "clockless_block_arm_k66.h" 13 | 14 | #endif -------------------------------------------------------------------------------- /Libraries/LedControl-master/library.properties: -------------------------------------------------------------------------------- 1 | name=LedControl 2 | version=1.0.6 3 | author=Eberhard Fahle 4 | maintainer=Eberhard Fahle 5 | sentence=A library for the MAX7219 and the MAX7221 Led display drivers. 6 | paragraph=The library supports multiple daisychained drivers and supports Led-Matrix displays as well as 7-Segment displays. 7 | category=Display 8 | url=http://wayoda.github.io/LedControl/ 9 | architectures=* 10 | 11 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit GFX Library 2 | version=1.2.2 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from. 6 | paragraph=Install this library in addition to the display library for your hardware. 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit-GFX-Library 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Libraries/FHT/hann_32.inc: -------------------------------------------------------------------------------- 1 | // hann_32.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // lookup values for a hann window 4 | // signed 16b format 5 | 6 | 0, 7 | 335, 8 | 1328, 9 | 2937, 10 | 5096, 11 | 7717, 12 | 10694, 13 | 13903, 14 | 17214, 15 | 20491, 16 | 23599, 17 | 26413, 18 | 28815, 19 | 30709, 20 | 32017, 21 | 32684, 22 | 32684, 23 | 32017, 24 | 30709, 25 | 28815, 26 | 26413, 27 | 23599, 28 | 20491, 29 | 17214, 30 | 13903, 31 | 10694, 32 | 7717, 33 | 5096, 34 | 2937, 35 | 1328, 36 | 335, 37 | 0, 38 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/library.properties: -------------------------------------------------------------------------------- 1 | name=LiquidCrystal_I2C 2 | version=1.1.2 3 | author=Frank de Brabander 4 | maintainer=Marco Schwartz 5 | sentence=A library for I2C LCD displays. 6 | paragraph= The library allows to control I2C displays with functions extremely similar to LiquidCrystal library. THIS LIBRARY MIGHT NOT BE COMPATIBLE WITH EXISTING SKETCHES. 7 | category=Display 8 | url=https://github.com/marcoschwartz/LiquidCrystal_I2C 9 | architectures=avr 10 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/library.properties: -------------------------------------------------------------------------------- 1 | name=FastLED 2 | version=3.1.5 3 | author=Daniel Garcia 4 | maintainer=Daniel Garcia 5 | sentence=Multi-platform library for controlling dozens of different types of LEDs along with optimized math, effect, and noise functions. 6 | paragraph=Multi-platform library for controlling dozens of different types of LEDs along with optimized math, effect, and noise functions. 7 | category=Display 8 | url=https://github.com/FastLED/FastLED 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Libraries/FHT/64_reorder.inc: -------------------------------------------------------------------------------- 1 | // 64_reorder.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // fft butterfly swap pairs 4 | // reorders input values for butterfly operations 5 | 6 | 56, 7, 7 | 60, 15, 8 | 58, 23, 9 | 62, 31, 10 | 57, 39, 11 | 61, 47, 12 | 59, 55, 13 | 48, 3, 14 | 52, 11, 15 | 50, 19, 16 | 54, 27, 17 | 49, 35, 18 | 53, 43, 19 | 40, 5, 20 | 44, 13, 21 | 42, 21, 22 | 46, 29, 23 | 41, 37, 24 | 32, 1, 25 | 36, 9, 26 | 34, 17, 27 | 38, 25, 28 | 24, 6, 29 | 28, 14, 30 | 26, 22, 31 | 16, 2, 32 | 20, 10, 33 | 8, 4, 34 | -------------------------------------------------------------------------------- /Libraries/FHT/cas_lookup_64.inc: -------------------------------------------------------------------------------- 1 | // cas_lookup_64.inc 2 | // guest openmusiclabs.com 9.4.12 3 | // lookup values for cos and sin of 2(pi)k/N 4 | // first is cos second is sin 5 | 6 | 30274,12540, 7 | 23170,23170, 8 | 12540,30274, 9 | 32138,6393, 10 | 30274,12540, 11 | 27246,18205, 12 | 23170,23170, 13 | 18205,27246, 14 | 12540,30274, 15 | 6393,32138, 16 | 32610,3212, 17 | 32138,6393, 18 | 31357,9512, 19 | 30274,12540, 20 | 28899,15447, 21 | 27246,18205, 22 | 25330,20788, 23 | 23170,23170, 24 | 20788,25330, 25 | 18205,27246, 26 | 15447,28899, 27 | 12540,30274, 28 | 9512,31357, 29 | 6393,32138, 30 | 3212,32610, 31 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/RGBSetDemo/RGBSetDemo.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #define NUM_LEDS 40 3 | 4 | CRGBArray leds; 5 | 6 | void setup() { FastLED.addLeds(leds, NUM_LEDS); } 7 | 8 | void loop(){ 9 | static uint8_t hue; 10 | for(int i = 0; i < NUM_LEDS/2; i++) { 11 | // fade everything out 12 | leds.fadeToBlackBy(40); 13 | 14 | // let's set an led value 15 | leds[i] = CHSV(hue++,255,255); 16 | 17 | // now, let's first 20 leds to the top 20 leds, 18 | leds(NUM_LEDS/2,NUM_LEDS-1) = leds(NUM_LEDS/2 - 1 ,0); 19 | FastLED.delay(33); 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/d21/led_sysdefs_arm_d21.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_ARM_D21_H 2 | #define __INC_LED_SYSDEFS_ARM_D21_H 3 | 4 | 5 | #define FASTLED_ARM 6 | #define FASTLED_ARM_M0_PLUS 7 | 8 | #ifndef INTERRUPT_THRESHOLD 9 | #define INTERRUPT_THRESHOLD 1 10 | #endif 11 | 12 | // Default to allowing interrupts 13 | #ifndef FASTLED_ALLOW_INTERRUPTS 14 | #define FASTLED_ALLOW_INTERRUPTS 0 15 | #endif 16 | 17 | #if FASTLED_ALLOW_INTERRUPTS == 1 18 | #define FASTLED_ACCURATE_CLOCK 19 | #endif 20 | 21 | // reusing/abusing cli/sei defs for due 22 | #define cli() __disable_irq(); 23 | #define sei() __enable_irq(); 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/library.properties: -------------------------------------------------------------------------------- 1 | name=LiquidCrystal 2 | version=1.0.5 3 | author=Arduino, Adafruit 4 | maintainer=Arduino 5 | sentence=Allows communication with alphanumerical liquid crystal displays (LCDs). 6 | paragraph=This library allows an Arduino/Genuino board to control LiquidCrystal displays (LCDs) based on the Hitachi HD44780 (or a compatible) chipset, which is found on most text-based LCDs. The library works with in either 4 or 8 bit mode (i.e. using 4 or 8 data lines in addition to the rs, enable, and, optionally, the rw control lines). 7 | category=Display 8 | url=http://www.arduino.cc/en/Reference/LiquidCrystal 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Libraries/LedControl-master/README.md: -------------------------------------------------------------------------------- 1 | LedControl 2 | ========== 3 | LedControl is an [Arduino](http://arduino.cc) library for MAX7219 and MAX7221 Led display drivers. 4 | The code also works with the [Teensy (3.1)](https://www.pjrc.com/teensy/) 5 | 6 | Documentation 7 | ------------- 8 | Documentation for the library is on the [Github Project Pages](http://wayoda.github.io/LedControl/) 9 | 10 | Download 11 | -------- 12 | The lastest binary version of the Library is always available from the 13 | [LedControl Release Page](https://github.com/wayoda/LedControl/releases) 14 | 15 | 16 | Install 17 | ------- 18 | The library can be installed using the [standard Arduino library install procedure](http://arduino.cc/en/Guide/Libraries) 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Libraries/LedControl-master/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For LedControl 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | LedControl KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | shutdown KEYWORD2 16 | setScanLimit KEYWORD2 17 | setIntensity KEYWORD2 18 | clearDisplay KEYWORD2 19 | setLed KEYWORD2 20 | setRow KEYWORD2 21 | setColumn KEYWORD2 22 | setDigit KEYWORD2 23 | setChar KEYWORD2 24 | 25 | ####################################### 26 | # Constants (LITERAL1) 27 | ####################################### 28 | 29 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/examples/HelloWorld/HelloWorld.pde: -------------------------------------------------------------------------------- 1 | //YWROBOT 2 | //Compatible with the Arduino IDE 1.0 3 | //Library version:1.1 4 | #include 5 | #include 6 | 7 | LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display 8 | 9 | void setup() 10 | { 11 | lcd.init(); // initialize the lcd 12 | lcd.init(); 13 | // Print a message to the LCD. 14 | lcd.backlight(); 15 | lcd.setCursor(3,0); 16 | lcd.print("Hello, world!"); 17 | lcd.setCursor(2,1); 18 | lcd.print("Ywrobot Arduino!"); 19 | lcd.setCursor(0,2); 20 | lcd.print("Arduino LCM IIC 2004"); 21 | lcd.setCursor(2,3); 22 | lcd.print("Power By Ec-yuan!"); 23 | } 24 | 25 | 26 | void loop() 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/README.md: -------------------------------------------------------------------------------- 1 | Image2Code is a small java utility to convert images into a byte array that can be used as a bitmap in the Adafruit-GFX-library 2 | 3 | # USER Guide 4 | 5 | ## To Run 6 | Run the command: ./gradlew run to launch the application. 7 | 8 | ## Using the Application 9 | 1. Click "choose file" button. 10 | 2. Then copy paste the generated code in your arduino sketch. 11 | 12 | ## Dependencies: 13 | 1. Java: If you do not have this installed, it can be found at: http://www.java.com/en/download/ if you havn't already done so. 14 | 2. Gradle: The gradlew will take care of this dependency. Just running any gradlew command will pull down the dependency 15 | 16 | #DEV guide: 17 | This sub-project using Gradle to build. To build a runnable jar: ./gradlew jar 18 | -------------------------------------------------------------------------------- /Libraries/FHT/hann_64.inc: -------------------------------------------------------------------------------- 1 | // hann_64.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // lookup values for a hann window 4 | // signed 16b format 5 | 6 | 0, 7 | 81, 8 | 325, 9 | 728, 10 | 1287, 11 | 1995, 12 | 2847, 13 | 3833, 14 | 4944, 15 | 6169, 16 | 7495, 17 | 8909, 18 | 10398, 19 | 11947, 20 | 13539, 21 | 15160, 22 | 16792, 23 | 18421, 24 | 20030, 25 | 21602, 26 | 23123, 27 | 24576, 28 | 25948, 29 | 27225, 30 | 28394, 31 | 29444, 32 | 30364, 33 | 31145, 34 | 31780, 35 | 32261, 36 | 32585, 37 | 32748, 38 | 32748, 39 | 32585, 40 | 32261, 41 | 31780, 42 | 31145, 43 | 30364, 44 | 29444, 45 | 28394, 46 | 27225, 47 | 25948, 48 | 24576, 49 | 23123, 50 | 21602, 51 | 20030, 52 | 18421, 53 | 16792, 54 | 15160, 55 | 13539, 56 | 11947, 57 | 10398, 58 | 8909, 59 | 7495, 60 | 6169, 61 | 4944, 62 | 3833, 63 | 2847, 64 | 1995, 65 | 1287, 66 | 728, 67 | 325, 68 | 81, 69 | 0, 70 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/extras/AppleII.s65: -------------------------------------------------------------------------------- 1 | KBD = $C000 ;Read keydown 2 | KBDSTRB = $C010 ;Reset keybd 3 | 4 | SPKR = $C030 ;Toggle speaker 5 | 6 | ; TTL digital output pins on 7 | ; 16-pin DIP game connector 8 | SETAN0 = $C058 9 | CLRAN0 = $C059 10 | SETAN1 = $C05A 11 | CLRAN1 = $C05B 12 | SETAN2 = $C05C 13 | CLRAN2 = $C05D 14 | SETAN3 = $C05E 15 | CLRAN3 = $C05F 16 | 17 | PIN12ON = CLRAN3 18 | PIN12OFF= SETAN3 19 | PIN13ON = CLRAN2 20 | PIN13OFF= SETAN2 21 | PIN14ON = CLRAN1 22 | PIN14OFF= SETAN1 23 | PIN15ON = CLRAN0 24 | PIN15OFF= SETAN0 25 | 26 | ;Special for pin 5, except on //gs 27 | C040STROBE = $C040 28 | PIN5STROBE = C040STROBE 29 | 30 | SolidApple = $C062 ; read SW1 or SA 31 | OpenApple = $C061 ; read SW0 or OA 32 | 33 | VBL = $C019 ; vertical blanking 34 | 35 | WAIT = $FCA8 ; wait a little while 36 | 37 | CROUT = $FD8E ; print a CR 38 | PRBYTE = $FDDA ; print a hex byte 39 | 40 | 41 | -------------------------------------------------------------------------------- /Libraries/FHT/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For ArduinoFHT 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | FHT KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | fht_run KEYWORD2 16 | fht_reorder KEYWORD2 17 | fht_window KEYWORD2 18 | fht_mag_log KEYWORD2 19 | fht_mag_lin KEYWORD2 20 | fht_mag_lin8 KEYWORD2 21 | fht_mag_octave KEYWORD2 22 | 23 | 24 | ####################################### 25 | # Constants (LITERAL1) 26 | ####################################### 27 | 28 | FHT_N LITERAL1 29 | SCALE LITERAL1 30 | WINDOW LITERAL1 31 | LIN_OUT LITERAL1 32 | LIN_OUT8 LITERAL1 33 | OCTAVE LITERAL1 34 | LOG_OUT LITERAL1 35 | REORDER LITERAL1 36 | OCT_NORM LITERAL1 37 | 38 | 39 | -------------------------------------------------------------------------------- /Libraries/FHT/128_reorder.inc: -------------------------------------------------------------------------------- 1 | // 128_reorder.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // fft butterfly swap pairs 4 | // reorders input values for butterfly operations 5 | 6 | 112, 7, 7 | 120, 15, 8 | 116, 23, 9 | 124, 31, 10 | 114, 39, 11 | 122, 47, 12 | 118, 55, 13 | 126, 63, 14 | 113, 71, 15 | 121, 79, 16 | 117, 87, 17 | 125, 95, 18 | 115, 103, 19 | 123, 111, 20 | 96, 3, 21 | 104, 11, 22 | 100, 19, 23 | 108, 27, 24 | 98, 35, 25 | 106, 43, 26 | 102, 51, 27 | 110, 59, 28 | 97, 67, 29 | 105, 75, 30 | 101, 83, 31 | 109, 91, 32 | 80, 5, 33 | 88, 13, 34 | 84, 21, 35 | 92, 29, 36 | 82, 37, 37 | 90, 45, 38 | 86, 53, 39 | 94, 61, 40 | 81, 69, 41 | 89, 77, 42 | 64, 1, 43 | 72, 9, 44 | 68, 17, 45 | 76, 25, 46 | 66, 33, 47 | 74, 41, 48 | 70, 49, 49 | 78, 57, 50 | 48, 6, 51 | 56, 14, 52 | 52, 22, 53 | 60, 30, 54 | 50, 38, 55 | 58, 46, 56 | 32, 2, 57 | 40, 10, 58 | 36, 18, 59 | 44, 26, 60 | 16, 4, 61 | 24, 12, 62 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/preview_changes.txt: -------------------------------------------------------------------------------- 1 | FastLED 3.1 preview changes: 2 | * UART in SPI mode support on AVR 3 | * Support for using both hardware SPI pinsets on the Teensy 3.x - 11/13 and 7/14. 4 | * Added UCS1904 support 5 | * Better AVR cycle counting 6 | * Split WS2812/WS2811 timings 7 | * Added DOTSTAR definition for adafruit dotstar pixels (aka APA102) 8 | * 8-way parallel output on teensy 3, 3.1 (portc,portd), due/digix (porta, portb, portd) 9 | * 12-way parallel output on teensy 3, 3.1 (portc) 10 | * 16-way parallel output on teensy 3, 3.1 (portc & portd paired) 11 | * refresh rate limiting 12 | * interrupt friendly code on teensy 3/3.1 13 | * -interrupt friendly code on AVR- <-- disabled for now 14 | * interrupt friendly code on the due 15 | * code re-org for future wider platform support 16 | * Spark Core support 17 | * arduino zero support (no hardware spi yet) 18 | * greatly improved clockless output for avr 19 | * greatly improved clockless output for arm m0 boards 20 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Multiple/OctoWS2811Demo/OctoWS2811Demo.ino: -------------------------------------------------------------------------------- 1 | #define USE_OCTOWS2811 2 | #include 3 | #include 4 | 5 | #define NUM_LEDS_PER_STRIP 64 6 | #define NUM_STRIPS 8 7 | 8 | CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP]; 9 | 10 | // Pin layouts on the teensy 3: 11 | // OctoWS2811: 2,14,7,8,6,20,21,5 12 | 13 | void setup() { 14 | LEDS.addLeds(leds, NUM_LEDS_PER_STRIP); 15 | LEDS.setBrightness(32); 16 | } 17 | 18 | void loop() { 19 | static uint8_t hue = 0; 20 | for(int i = 0; i < NUM_STRIPS; i++) { 21 | for(int j = 0; j < NUM_LEDS_PER_STRIP; j++) { 22 | leds[(i*NUM_LEDS_PER_STRIP) + j] = CHSV((32*i) + hue+j,192,255); 23 | } 24 | } 25 | 26 | // Set the first n leds on each strip to show which strip it is 27 | for(int i = 0; i < NUM_STRIPS; i++) { 28 | for(int j = 0; j <= i; j++) { 29 | leds[(i*NUM_LEDS_PER_STRIP) + j] = CRGB::Red; 30 | } 31 | } 32 | 33 | hue++; 34 | 35 | LEDS.show(); 36 | LEDS.delay(10); 37 | } 38 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/examples/SerialDisplay/SerialDisplay.pde: -------------------------------------------------------------------------------- 1 | /* 2 | * Displays text sent over the serial port (e.g. from the Serial Monitor) on 3 | * an attached LCD. 4 | * YWROBOT 5 | *Compatible with the Arduino IDE 1.0 6 | *Library version:1.1 7 | */ 8 | #include 9 | #include 10 | 11 | LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display 12 | 13 | void setup() 14 | { 15 | lcd.init(); // initialize the lcd 16 | lcd.backlight(); 17 | Serial.begin(9600); 18 | } 19 | 20 | void loop() 21 | { 22 | // when characters arrive over the serial port... 23 | if (Serial.available()) { 24 | // wait a bit for the entire message to arrive 25 | delay(100); 26 | // clear the screen 27 | lcd.clear(); 28 | // read all the available characters 29 | while (Serial.available() > 0) { 30 | // display each character to the LCD 31 | lcd.write(Serial.read()); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For LiquidCrystal 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | LiquidCrystal KEYWORD1 LiquidCrystal 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | begin KEYWORD2 16 | clear KEYWORD2 17 | home KEYWORD2 18 | print KEYWORD2 19 | setCursor KEYWORD2 20 | cursor KEYWORD2 21 | noCursor KEYWORD2 22 | blink KEYWORD2 23 | noBlink KEYWORD2 24 | display KEYWORD2 25 | noDisplay KEYWORD2 26 | autoscroll KEYWORD2 27 | noAutoscroll KEYWORD2 28 | leftToRight KEYWORD2 29 | rightToLeft KEYWORD2 30 | scrollDisplayLeft KEYWORD2 31 | scrollDisplayRight KEYWORD2 32 | createChar KEYWORD2 33 | setRowOffsets KEYWORD2 34 | 35 | ####################################### 36 | # Constants (LITERAL1) 37 | ####################################### 38 | 39 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/gfxfont.h: -------------------------------------------------------------------------------- 1 | // Font structures for newer Adafruit_GFX (1.1 and later). 2 | // Example fonts are included in 'Fonts' directory. 3 | // To use a font in your Arduino sketch, #include the corresponding .h 4 | // file and pass address of GFXfont struct to setFont(). Pass NULL to 5 | // revert to 'classic' fixed-space bitmap font. 6 | 7 | #ifndef _GFXFONT_H_ 8 | #define _GFXFONT_H_ 9 | 10 | typedef struct { // Data stored PER GLYPH 11 | uint16_t bitmapOffset; // Pointer into GFXfont->bitmap 12 | uint8_t width, height; // Bitmap dimensions in pixels 13 | uint8_t xAdvance; // Distance to advance cursor (x axis) 14 | int8_t xOffset, yOffset; // Dist from cursor pos to UL corner 15 | } GFXglyph; 16 | 17 | typedef struct { // Data stored for FONT AS A WHOLE: 18 | uint8_t *bitmap; // Glyph bitmaps, concatenated 19 | GFXglyph *glyph; // Glyph array 20 | uint8_t first, last; // ASCII extents 21 | uint8_t yAdvance; // Newline distance (y axis) 22 | } GFXfont; 23 | 24 | #endif // _GFXFONT_H_ 25 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/nrf51/led_sysdefs_arm_nrf51.h: -------------------------------------------------------------------------------- 1 | #ifndef __LED_SYSDEFS_ARM_NRF51 2 | #define __LED_SYSDEFS_ARM_NRF51 3 | 4 | #ifndef NRF51 5 | #define NRF51 6 | #endif 7 | 8 | #define LED_TIMER NRF_TIMER1 9 | #define FASTLED_NO_PINMAP 10 | #define FASTLED_HAS_CLOCKLESS 11 | 12 | #define FASTLED_SPI_BYTE_ONLY 13 | 14 | #define FASTLED_ARM 15 | #define FASTLED_ARM_M0 16 | 17 | #ifndef F_CPU 18 | #define F_CPU 16000000 19 | #endif 20 | 21 | #include 22 | #include "nrf51.h" 23 | #include "core_cm0.h" 24 | 25 | typedef volatile uint32_t RoReg; 26 | typedef volatile uint32_t RwReg; 27 | typedef uint32_t prog_uint32_t; 28 | typedef uint8_t boolean; 29 | 30 | #define PROGMEM 31 | #define NO_PROGMEM 32 | #define NEED_CXX_BITS 33 | 34 | // Default to NOT using PROGMEM here 35 | #ifndef FASTLED_USE_PROGMEM 36 | #define FASTLED_USE_PROGMEM 0 37 | #endif 38 | 39 | #ifndef FASTLED_ALLOW_INTERRUPTS 40 | #define FASTLED_ALLOW_INTERRUPTS 1 41 | #endif 42 | 43 | #define cli() __disable_irq(); 44 | #define sei() __enable_irq(); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/bitswap.cpp: -------------------------------------------------------------------------------- 1 | #define FASTLED_INTERNAL 2 | #include "FastLED.h" 3 | 4 | /// Simplified form of bits rotating function. Based on code found here - http://www.hackersdelight.org/hdcodetxt/transpose8.c.txt - rotating 5 | /// data into LSB for a faster write (the code using this data can happily walk the array backwards) 6 | void transpose8x1_noinline(unsigned char *A, unsigned char *B) { 7 | uint32_t x, y, t; 8 | 9 | // Load the array and pack it into x and y. 10 | y = *(unsigned int*)(A); 11 | x = *(unsigned int*)(A+4); 12 | 13 | // pre-transform x 14 | t = (x ^ (x >> 7)) & 0x00AA00AA; x = x ^ t ^ (t << 7); 15 | t = (x ^ (x >>14)) & 0x0000CCCC; x = x ^ t ^ (t <<14); 16 | 17 | // pre-transform y 18 | t = (y ^ (y >> 7)) & 0x00AA00AA; y = y ^ t ^ (t << 7); 19 | t = (y ^ (y >>14)) & 0x0000CCCC; y = y ^ t ^ (t <<14); 20 | 21 | // final transform 22 | t = (x & 0xF0F0F0F0) | ((y >> 4) & 0x0F0F0F0F); 23 | y = ((x << 4) & 0xF0F0F0F0) | (y & 0x0F0F0F0F); 24 | x = t; 25 | 26 | *((uint32_t*)B) = y; 27 | *((uint32_t*)(B+4)) = x; 28 | } 29 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/esp/8266/led_sysdefs_esp8266.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef ESP8266 4 | #define ESP8266 5 | #endif 6 | 7 | #define FASTLED_ESP8266 8 | 9 | // Use system millis timer 10 | #define FASTLED_HAS_MILLIS 11 | 12 | typedef volatile uint32_t RoReg; 13 | typedef volatile uint32_t RwReg; 14 | typedef uint32_t prog_uint32_t; 15 | typedef uint8_t boolean; 16 | 17 | // Default to NOT using PROGMEM here 18 | #ifndef FASTLED_USE_PROGMEM 19 | # define FASTLED_USE_PROGMEM 0 20 | #endif 21 | 22 | #ifndef FASTLED_ALLOW_INTERRUPTS 23 | # define FASTLED_ALLOW_INTERRUPTS 1 24 | # define INTERRUPT_THRESHOLD 0 25 | #endif 26 | 27 | #define NEED_CXX_BITS 28 | 29 | // These can be overridden 30 | #if !defined(FASTLED_ESP8266_RAW_PIN_ORDER) && !defined(FASTLED_ESP8266_NODEMCU_PIN_ORDER) && !defined(FASTLED_ESP8266_D1_PIN_ORDER) 31 | # ifdef ARDUINO_ESP8266_NODEMCU 32 | # define FASTLED_ESP8266_NODEMCU_PIN_ORDER 33 | # else 34 | # define FASTLED_ESP8266_RAW_PIN_ORDER 35 | # endif 36 | #endif 37 | 38 | // #define cli() os_intr_lock(); 39 | // #define sei() os_intr_lock(); 40 | -------------------------------------------------------------------------------- /Firmware/spektrumFHT/spektrumFHT.ino: -------------------------------------------------------------------------------- 1 | #define LOG_OUT 1 // use the log output function 2 | #define FHT_N 256 // set to 256 point fht 3 | #include 4 | #define MIC_PIN 0 5 | double prevVolts = 100.0; 6 | 7 | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) 8 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) 9 | 10 | void setup() { 11 | Serial.begin(9600); 12 | 13 | sbi(ADCSRA, ADPS2); 14 | cbi(ADCSRA, ADPS1); 15 | sbi(ADCSRA, ADPS0); 16 | 17 | analogReference(EXTERNAL); 18 | } 19 | 20 | void loop() { 21 | for (int i = 0 ; i < FHT_N ; i++) { 22 | int sample = analogRead(MIC_PIN); 23 | fht_input[i] = sample; // put real data into bins 24 | } 25 | fht_window(); // window the data for better frequency response 26 | fht_reorder(); // reorder the data before doing the fht 27 | fht_run(); // process the data in the fht 28 | fht_mag_log(); // take the output of the fht 29 | 30 | for (int curBin = 0; curBin < FHT_N / 2; ++curBin) { 31 | Serial.print(fht_log_out[curBin]); 32 | Serial.print(" "); 33 | } 34 | Serial.println(""); 35 | delay(500); 36 | } -------------------------------------------------------------------------------- /Libraries/FHT/cas_lookup_128.inc: -------------------------------------------------------------------------------- 1 | // cas_lookup_128.inc 2 | // guest openmusiclabs.com 9.4.12 3 | // lookup values for cos and sin of 2(pi)k/N 4 | // first is cos second is sin 5 | 6 | 30274,12540, 7 | 23170,23170, 8 | 12540,30274, 9 | 32138,6393, 10 | 30274,12540, 11 | 27246,18205, 12 | 23170,23170, 13 | 18205,27246, 14 | 12540,30274, 15 | 6393,32138, 16 | 32610,3212, 17 | 32138,6393, 18 | 31357,9512, 19 | 30274,12540, 20 | 28899,15447, 21 | 27246,18205, 22 | 25330,20788, 23 | 23170,23170, 24 | 20788,25330, 25 | 18205,27246, 26 | 15447,28899, 27 | 12540,30274, 28 | 9512,31357, 29 | 6393,32138, 30 | 3212,32610, 31 | 32729,1608, 32 | 32610,3212, 33 | 32413,4808, 34 | 32138,6393, 35 | 31786,7962, 36 | 31357,9512, 37 | 30853,11039, 38 | 30274,12540, 39 | 29622,14010, 40 | 28899,15447, 41 | 28106,16846, 42 | 27246,18205, 43 | 26320,19520, 44 | 25330,20788, 45 | 24279,22006, 46 | 23170,23170, 47 | 22006,24279, 48 | 20788,25330, 49 | 19520,26320, 50 | 18205,27246, 51 | 16846,28106, 52 | 15447,28899, 53 | 14010,29622, 54 | 12540,30274, 55 | 11039,30853, 56 | 9512,31357, 57 | 7962,31786, 58 | 6393,32138, 59 | 4808,32413, 60 | 3212,32610, 61 | 1608,32729, 62 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FastLED", 3 | "description": "FastLED is a library for programming addressable rgb led strips (APA102/Dotstar, WS2812/Neopixel, LPD8806, and a dozen others) acting both as a driver and as a library for color management and fast math.", 4 | "keywords": "led,noise,rgb,math,fast", 5 | "authors": [ 6 | { 7 | "name": "Daniel Garcia", 8 | "url": "https://github.com/focalintent", 9 | "maintainer": true 10 | }, 11 | { 12 | "name": "Mark Kriegsman", 13 | "url": "https://github.com/kriegsman", 14 | "maintainer": true 15 | } 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/FastLED/FastLED.git" 20 | }, 21 | "version": "3.1.4", 22 | "license": "MIT", 23 | "homepage": "http://fastled.io", 24 | "frameworks": "arduino", 25 | "platforms": "atmelavr,atmelsam,freescalekinetis,nordicnrf51,nxplpc,ststm32,teensy", 26 | "examples": [ 27 | "examples/*/*.ino", 28 | "examples/*/*/*.ino" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_PLATFORMS_H 2 | #define __INC_PLATFORMS_H 3 | 4 | #include "FastLED.h" 5 | 6 | #include "fastled_config.h" 7 | 8 | #if defined(NRF51) 9 | #include "platforms/arm/nrf51/fastled_arm_nrf51.h" 10 | #elif defined(__MK20DX128__) || defined(__MK20DX256__) 11 | // Include k20/T3 headers 12 | #include "platforms/arm/k20/fastled_arm_k20.h" 13 | #elif defined(__MK66FX1M0__) 14 | // Include k66/T3.6 headers 15 | #include "platforms/arm/k66/fastled_arm_k66.h" 16 | #elif defined(__MKL26Z64__) 17 | // Include kl26/T-LC headers 18 | #include "platforms/arm/kl26/fastled_arm_kl26.h" 19 | #elif defined(__SAM3X8E__) 20 | // Include sam/due headers 21 | #include "platforms/arm/sam/fastled_arm_sam.h" 22 | #elif defined(STM32F10X_MD) 23 | #include "platforms/arm/stm32/fastled_arm_stm32.h" 24 | #elif defined(__SAMD21G18A__) || defined(__SAMD21J18A__) || defined(__SAMD21E17A__) || defined(__SAMD21E18A__) 25 | #include "platforms/arm/d21/fastled_arm_d21.h" 26 | #elif defined(ESP8266) 27 | #include "platforms/esp/8266/fastled_esp8266.h" 28 | #else 29 | // AVR platforms 30 | #include "platforms/avr/fastled_avr.h" 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 FastLED 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Max72xxPanel 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | Max72xxPanel KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | shutdown KEYWORD2 16 | setIntensity KEYWORD2 17 | invertDisplay KEYWORD2 18 | drawPixel KEYWORD2 19 | drawLine KEYWORD2 20 | drawRect KEYWORD2 21 | fillRect KEYWORD2 22 | fillScreen KEYWORD2 23 | drawCircle KEYWORD2 24 | fillCircle KEYWORD2 25 | drawTriangle KEYWORD2 26 | fillTriangle KEYWORD2 27 | drawRoundRect KEYWORD2 28 | fillRoundRect KEYWORD2 29 | drawBitmap KEYWORD2 30 | drawChar KEYWORD2 31 | write KEYWORD2 32 | setCursor KEYWORD2 33 | setTextColor KEYWORD2 34 | setTextColor KEYWORD2 35 | setTextSize KEYWORD2 36 | setTextWrap KEYWORD2 37 | setPosition KEYWORD2 38 | setRotation KEYWORD2 39 | getRotation KEYWORD2 40 | 41 | ####################################### 42 | # Constants (LITERAL1) 43 | ####################################### 44 | 45 | -------------------------------------------------------------------------------- /Libraries/LedControl-master/LICENSE: -------------------------------------------------------------------------------- 1 | LedControl.h - A library for controling Leds with a MAX7219/MAX7221 2 | Copyright (c) 2007-2015 Eberhard Fahle 3 | 4 | Permission is hereby granted, free of charge, to any person 5 | obtaining a copy of this software and associated documentation 6 | files (the "Software"), to deal in the Software without 7 | restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following 11 | conditions: 12 | 13 | This permission notice shall be included in all copies or 14 | substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/sam/led_sysdefs_arm_sam.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_ARM_SAM_H 2 | #define __INC_LED_SYSDEFS_ARM_SAM_H 3 | 4 | 5 | #define FASTLED_ARM 6 | 7 | // Setup DUE timer defines/channels/etc... 8 | #ifndef DUE_TIMER_CHANNEL 9 | #define DUE_TIMER_GROUP 0 10 | #endif 11 | 12 | #ifndef DUE_TIMER_CHANNEL 13 | #define DUE_TIMER_CHANNEL 0 14 | #endif 15 | 16 | #define DUE_TIMER ((DUE_TIMER_GROUP==0) ? TC0 : ((DUE_TIMER_GROUP==1) ? TC1 : TC2)) 17 | #define DUE_TIMER_ID (ID_TC0 + (DUE_TIMER_GROUP*3) + DUE_TIMER_CHANNEL) 18 | #define DUE_TIMER_VAL (DUE_TIMER->TC_CHANNEL[DUE_TIMER_CHANNEL].TC_CV << 1) 19 | #define DUE_TIMER_RUNNING ((DUE_TIMER->TC_CHANNEL[DUE_TIMER_CHANNEL].TC_SR & TC_SR_CLKSTA) != 0) 20 | 21 | #ifndef INTERRUPT_THRESHOLD 22 | #define INTERRUPT_THRESHOLD 1 23 | #endif 24 | 25 | // Default to allowing interrupts 26 | #ifndef FASTLED_ALLOW_INTERRUPTS 27 | #define FASTLED_ALLOW_INTERRUPTS 1 28 | #endif 29 | 30 | #if FASTLED_ALLOW_INTERRUPTS == 1 31 | #define FASTLED_ACCURATE_CLOCK 32 | #endif 33 | 34 | // reusing/abusing cli/sei defs for due 35 | #define cli() __disable_irq(); __disable_fault_irq(); 36 | #define sei() __enable_irq(); __enable_fault_irq(); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/README.adoc: -------------------------------------------------------------------------------- 1 | = Liquid Crystal Library for Arduino = 2 | 3 | This library allows an Arduino board to control LiquidCrystal displays (LCDs) based on the Hitachi HD44780 (or a compatible) chipset, which is found on most text-based LCDs. 4 | 5 | For more information about this library please visit us at 6 | http://www.arduino.cc/en/Reference/LiquidCrystal 7 | 8 | == License == 9 | 10 | Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved. 11 | Copyright (c) 2010 Arduino LLC. All right reserved. 12 | 13 | This library is free software; you can redistribute it and/or 14 | modify it under the terms of the GNU Lesser General Public 15 | License as published by the Free Software Foundation; either 16 | version 2.1 of the License, or (at your option) any later version. 17 | 18 | This library is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 21 | Lesser General Public License for more details. 22 | 23 | You should have received a copy of the GNU Lesser General Public 24 | License along with this library; if not, write to the Free Software 25 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 26 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/keywords.txt: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Syntax Coloring Map For LiquidCrystal_I2C 3 | ########################################### 4 | 5 | ########################################### 6 | # Datatypes (KEYWORD1) 7 | ########################################### 8 | 9 | LiquidCrystal_I2C KEYWORD1 10 | 11 | ########################################### 12 | # Methods and Functions (KEYWORD2) 13 | ########################################### 14 | init KEYWORD2 15 | begin KEYWORD2 16 | clear KEYWORD2 17 | home KEYWORD2 18 | noDisplay KEYWORD2 19 | display KEYWORD2 20 | noBlink KEYWORD2 21 | blink KEYWORD2 22 | noCursor KEYWORD2 23 | cursor KEYWORD2 24 | scrollDisplayLeft KEYWORD2 25 | scrollDisplayRight KEYWORD2 26 | leftToRight KEYWORD2 27 | rightToLeft KEYWORD2 28 | shiftIncrement KEYWORD2 29 | shiftDecrement KEYWORD2 30 | noBacklight KEYWORD2 31 | backlight KEYWORD2 32 | autoscroll KEYWORD2 33 | noAutoscroll KEYWORD2 34 | createChar KEYWORD2 35 | setCursor KEYWORD2 36 | print KEYWORD2 37 | blink_on KEYWORD2 38 | blink_off KEYWORD2 39 | cursor_on KEYWORD2 40 | cursor_off KEYWORD2 41 | setBacklight KEYWORD2 42 | load_custom_character KEYWORD2 43 | printstr KEYWORD2 44 | ########################################### 45 | # Constants (LITERAL1) 46 | ########################################### 47 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/k20/led_sysdefs_arm_k20.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_ARM_K20_H 2 | #define __INC_LED_SYSDEFS_ARM_K20_H 3 | 4 | #define FASTLED_TEENSY3 5 | #define FASTLED_ARM 6 | 7 | #ifndef INTERRUPT_THRESHOLD 8 | #define INTERRUPT_THRESHOLD 1 9 | #endif 10 | 11 | // Default to allowing interrupts 12 | #ifndef FASTLED_ALLOW_INTERRUPTS 13 | #define FASTLED_ALLOW_INTERRUPTS 1 14 | #endif 15 | 16 | #if FASTLED_ALLOW_INTERRUPTS == 1 17 | #define FASTLED_ACCURATE_CLOCK 18 | #endif 19 | 20 | #if (F_CPU == 96000000) 21 | #define CLK_DBL 1 22 | #endif 23 | 24 | // Get some system include files 25 | #include 26 | #include // for cli/se definitions 27 | 28 | // Define the register types 29 | #if defined(ARDUINO) // && ARDUINO < 150 30 | typedef volatile uint8_t RoReg; /**< Read only 8-bit register (volatile const unsigned int) */ 31 | typedef volatile uint8_t RwReg; /**< Read-Write 8-bit register (volatile unsigned int) */ 32 | #endif 33 | 34 | extern volatile uint32_t systick_millis_count; 35 | # define MS_COUNTER systick_millis_count 36 | 37 | 38 | // Default to using PROGMEM, since TEENSY3 provides it 39 | // even though all it does is ignore it. Just being 40 | // conservative here in case TEENSY3 changes. 41 | #ifndef FASTLED_USE_PROGMEM 42 | #define FASTLED_USE_PROGMEM 1 43 | #endif 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/k66/led_sysdefs_arm_k66.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_ARM_K66_H 2 | #define __INC_LED_SYSDEFS_ARM_K66_H 3 | 4 | #define FASTLED_TEENSY3 5 | #define FASTLED_ARM 6 | 7 | #ifndef INTERRUPT_THRESHOLD 8 | #define INTERRUPT_THRESHOLD 1 9 | #endif 10 | 11 | // Default to allowing interrupts 12 | #ifndef FASTLED_ALLOW_INTERRUPTS 13 | #define FASTLED_ALLOW_INTERRUPTS 1 14 | #endif 15 | 16 | #if FASTLED_ALLOW_INTERRUPTS == 1 17 | #define FASTLED_ACCURATE_CLOCK 18 | #endif 19 | 20 | #if (F_CPU == 192000000) 21 | #define CLK_DBL 1 22 | #endif 23 | 24 | // Get some system include files 25 | #include 26 | #include // for cli/se definitions 27 | 28 | // Define the register types 29 | #if defined(ARDUINO) // && ARDUINO < 150 30 | typedef volatile uint8_t RoReg; /**< Read only 8-bit register (volatile const unsigned int) */ 31 | typedef volatile uint8_t RwReg; /**< Read-Write 8-bit register (volatile unsigned int) */ 32 | #endif 33 | 34 | extern volatile uint32_t systick_millis_count; 35 | # define MS_COUNTER systick_millis_count 36 | 37 | 38 | // Default to using PROGMEM, since TEENSY3 provides it 39 | // even though all it does is ignore it. Just being 40 | // conservative here in case TEENSY3 changes. 41 | #ifndef FASTLED_USE_PROGMEM 42 | #define FASTLED_USE_PROGMEM 1 43 | #endif 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/fontconvert/makefonts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Ugly little Bash script, generates a set of .h files for GFX using 4 | # GNU FreeFont sources. There are three fonts: 'Mono' (Courier-like), 5 | # 'Sans' (Helvetica-like) and 'Serif' (Times-like); four styles: regular, 6 | # bold, oblique or italic, and bold+oblique or bold+italic; and four 7 | # sizes: 9, 12, 18 and 24 point. No real error checking or anything, 8 | # this just powers through all the combinations, calling the fontconvert 9 | # utility and redirecting the output to a .h file for each combo. 10 | 11 | # Adafruit_GFX repository does not include the source outline fonts 12 | # (huge zipfile, different license) but they're easily acquired: 13 | # http://savannah.gnu.org/projects/freefont/ 14 | 15 | convert=./fontconvert 16 | inpath=~/Desktop/freefont/ 17 | outpath=../Fonts/ 18 | fonts=(FreeMono FreeSans FreeSerif) 19 | styles=("" Bold Italic BoldItalic Oblique BoldOblique) 20 | sizes=(9 12 18 24) 21 | 22 | for f in ${fonts[*]} 23 | do 24 | for index in ${!styles[*]} 25 | do 26 | st=${styles[$index]} 27 | for si in ${sizes[*]} 28 | do 29 | infile=$inpath$f$st".ttf" 30 | if [ -f $infile ] # Does source combination exist? 31 | then 32 | outfile=$outpath$f$st$si"pt7b.h" 33 | # printf "%s %s %s > %s\n" $convert $infile $si $outfile 34 | $convert $infile $si > $outfile 35 | fi 36 | done 37 | done 38 | done 39 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/kl26/led_sysdefs_arm_kl26.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_ARM_KL26_H 2 | #define __INC_LED_SYSDEFS_ARM_KL26_H 3 | 4 | #define FASTLED_TEENSYLC 5 | #define FASTLED_ARM 6 | #define FASTLED_ARM_M0_PLUS 7 | 8 | #ifndef INTERRUPT_THRESHOLD 9 | #define INTERRUPT_THRESHOLD 1 10 | #endif 11 | 12 | #define FASTLED_SPI_BYTE_ONLY 13 | 14 | // Default to allowing interrupts 15 | #ifndef FASTLED_ALLOW_INTERRUPTS 16 | #define FASTLED_ALLOW_INTERRUPTS 1 17 | #endif 18 | 19 | #if FASTLED_ALLOW_INTERRUPTS == 1 20 | #define FASTLED_ACCURATE_CLOCK 21 | #endif 22 | 23 | #if (F_CPU == 96000000) 24 | #define CLK_DBL 1 25 | #endif 26 | 27 | // Get some system include files 28 | #include 29 | #include // for cli/se definitions 30 | 31 | // Define the register types 32 | #if defined(ARDUINO) // && ARDUINO < 150 33 | typedef volatile uint8_t RoReg; /**< Read only 8-bit register (volatile const unsigned int) */ 34 | typedef volatile uint8_t RwReg; /**< Read-Write 8-bit register (volatile unsigned int) */ 35 | #endif 36 | 37 | extern volatile uint32_t systick_millis_count; 38 | # define MS_COUNTER systick_millis_count 39 | 40 | // Default to using PROGMEM since TEENSYLC provides it 41 | // even though all it does is ignore it. Just being 42 | // conservative here in case TEENSYLC changes. 43 | #ifndef FASTLED_USE_PROGMEM 44 | #define FASTLED_USE_PROGMEM 1 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/stm32/led_sysdefs_arm_stm32.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_ARM_SAM_H 2 | #define __INC_LED_SYSDEFS_ARM_SAM_H 3 | 4 | #include "application.h" 5 | 6 | #define FASTLED_NAMESPACE_BEGIN namespace NSFastLED { 7 | #define FASTLED_NAMESPACE_END } 8 | #define FASTLED_USING_NAMESPACE using namespace NSFastLED; 9 | 10 | #define FASTLED_ARM 11 | 12 | #ifndef INTERRUPT_THRESHOLD 13 | #define INTERRUPT_THRESHOLD 1 14 | #endif 15 | 16 | // Default to allowing interrupts 17 | #ifndef FASTLED_ALLOW_INTERRUPTS 18 | #define FASTLED_ALLOW_INTERRUPTS 0 19 | #endif 20 | 21 | #if FASTLED_ALLOW_INTERRUPTS == 1 22 | #define FASTLED_ACCURATE_CLOCK 23 | #endif 24 | 25 | // reusing/abusing cli/sei defs for due 26 | #define cli() __disable_irq(); __disable_fault_irq(); 27 | #define sei() __enable_irq(); __enable_fault_irq(); 28 | 29 | // pgmspace definitions 30 | #define PROGMEM 31 | #define pgm_read_dword(addr) (*(const unsigned long *)(addr)) 32 | #define pgm_read_dword_near(addr) pgm_read_dword(addr) 33 | 34 | // Default to NOT using PROGMEM here 35 | #ifndef FASTLED_USE_PROGMEM 36 | #define FASTLED_USE_PROGMEM 0 37 | #endif 38 | 39 | // data type defs 40 | typedef volatile uint8_t RoReg; /**< Read only 8-bit register (volatile const unsigned int) */ 41 | typedef volatile uint8_t RwReg; /**< Read-Write 8-bit register (volatile unsigned int) */ 42 | 43 | #define FASTLED_NO_PINMAP 44 | 45 | #define F_CPU 72000000 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012 Adafruit Industries. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | - Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | - Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Multiple/MultipleStripsInOneArray/MultipleStripsInOneArray.ino: -------------------------------------------------------------------------------- 1 | // MultipleStripsInOneArray - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on 2 | // using multiple controllers. In this example, we're going to set up four NEOPIXEL strips on three 3 | // different pins, each strip will be referring to a different part of the single led array 4 | 5 | #include "FastLED.h" 6 | 7 | #define NUM_STRIPS 3 8 | #define NUM_LEDS_PER_STRIP 60 9 | #define NUM_LEDS NUM_LEDS_PER_STRIP * NUM_STRIPS 10 | 11 | CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP]; 12 | 13 | // For mirroring strips, all the "special" stuff happens just in setup. We 14 | // just addLeds multiple times, once for each strip 15 | void setup() { 16 | // tell FastLED there's 60 NEOPIXEL leds on pin 10, starting at index 0 in the led array 17 | FastLED.addLeds(leds, 0, NUM_LEDS_PER_STRIP); 18 | 19 | // tell FastLED there's 60 NEOPIXEL leds on pin 11, starting at index 60 in the led array 20 | FastLED.addLeds(leds, NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP); 21 | 22 | // tell FastLED there's 60 NEOPIXEL leds on pin 12, starting at index 120 in the led array 23 | FastLED.addLeds(leds, 2 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP); 24 | 25 | } 26 | 27 | void loop() { 28 | for(int i = 0; i < NUM_LEDS; i++) { 29 | leds[i] = CRGB::Red; 30 | FastLED.show(); 31 | leds[i] = CRGB::Black; 32 | delay(100); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Multiple/ArrayOfLedArrays/ArrayOfLedArrays.ino: -------------------------------------------------------------------------------- 1 | // ArrayOfLedArrays - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on 2 | // using multiple controllers. In this example, we're going to set up three NEOPIXEL strips on three 3 | // different pins, each strip getting its own CRGB array to be played with, only this time they're going 4 | // to be all parts of an array of arrays. 5 | 6 | #include "FastLED.h" 7 | 8 | #define NUM_STRIPS 3 9 | #define NUM_LEDS_PER_STRIP 60 10 | CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP]; 11 | 12 | // For mirroring strips, all the "special" stuff happens just in setup. We 13 | // just addLeds multiple times, once for each strip 14 | void setup() { 15 | // tell FastLED there's 60 NEOPIXEL leds on pin 10 16 | FastLED.addLeds(leds[0], NUM_LEDS_PER_STRIP); 17 | 18 | // tell FastLED there's 60 NEOPIXEL leds on pin 11 19 | FastLED.addLeds(leds[1], NUM_LEDS_PER_STRIP); 20 | 21 | // tell FastLED there's 60 NEOPIXEL leds on pin 12 22 | FastLED.addLeds(leds[2], NUM_LEDS_PER_STRIP); 23 | 24 | } 25 | 26 | void loop() { 27 | // This outer loop will go over each strip, one at a time 28 | for(int x = 0; x < NUM_STRIPS; x++) { 29 | // This inner loop will go over each led in the current strip, one at a time 30 | for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) { 31 | leds[x][i] = CRGB::Red; 32 | FastLED.show(); 33 | leds[x][i] = CRGB::Black; 34 | delay(100); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/k20/smartmatrix_t3.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_SMARTMATRIX_T3_H 2 | #define __INC_SMARTMATRIX_T3_H 3 | 4 | #ifdef SmartMatrix_h 5 | #include 6 | 7 | FASTLED_NAMESPACE_BEGIN 8 | 9 | extern SmartMatrix *pSmartMatrix; 10 | 11 | // note - dmx simple must be included before FastSPI for this code to be enabled 12 | class CSmartMatrixController : public CPixelLEDController { 13 | SmartMatrix matrix; 14 | 15 | public: 16 | // initialize the LED controller 17 | virtual void init() { 18 | // Initialize 32x32 LED Matrix 19 | matrix.begin(); 20 | matrix.setBrightness(255); 21 | matrix.setColorCorrection(ccNone); 22 | 23 | // Clear screen 24 | clearLeds(0); 25 | matrix.swapBuffers(); 26 | pSmartMatrix = &matrix; 27 | } 28 | 29 | virtual void showPixels(PixelController & pixels) { 30 | if(SMART_MATRIX_CAN_TRIPLE_BUFFER) { 31 | rgb24 *md = matrix.getRealBackBuffer(); 32 | } else { 33 | rgb24 *md = matrix.backBuffer(); 34 | } 35 | while(pixels.has(1)) { 36 | md->red = pixels.loadAndScale0(); 37 | md->green = pixels.loadAndScale1(); 38 | md->blue = pixels.loadAndScale2(); 39 | md++; 40 | pixels.advanceData(); 41 | pixels.stepDithering(); 42 | } 43 | matrix.swapBuffers(); 44 | if(SMART_MATRIX_CAN_TRIPLE_BUFFER && pixels.advanceBy() > 0) { 45 | matrix.setBackBuffer(pixels.mData); 46 | } 47 | } 48 | 49 | }; 50 | 51 | FASTLED_NAMESPACE_END 52 | 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2013, Mark Ruys. All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 3. Neither the name of the copyright holders nor the names of its 13 | contributors may be used to endorse or promote products derived from 14 | this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY 17 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/avr/led_sysdefs_avr.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_AVR_H 2 | #define __INC_LED_SYSDEFS_AVR_H 3 | 4 | #define FASTLED_AVR 5 | 6 | #ifndef INTERRUPT_THRESHOLD 7 | #define INTERRUPT_THRESHOLD 2 8 | #endif 9 | 10 | #define FASTLED_SPI_BYTE_ONLY 11 | 12 | #include 13 | #include // for cli/se definitions 14 | 15 | // Define the register types 16 | #if defined(ARDUINO) // && ARDUINO < 150 17 | typedef volatile uint8_t RoReg; /**< Read only 8-bit register (volatile const unsigned int) */ 18 | typedef volatile uint8_t RwReg; /**< Read-Write 8-bit register (volatile unsigned int) */ 19 | #endif 20 | 21 | 22 | // Default to disallowing interrupts (may want to gate this on teensy2 vs. other arm platforms, since the 23 | // teensy2 has a good, fast millis interrupt implementation) 24 | #ifndef FASTLED_ALLOW_INTERRUPTS 25 | #define FASTLED_ALLOW_INTERRUPTS 0 26 | #endif 27 | 28 | #if FASTLED_ALLOW_INTERRUPTS == 1 29 | #define FASTLED_ACCURATE_CLOCK 30 | #endif 31 | 32 | 33 | // Default to using PROGMEM here 34 | #ifndef FASTLED_USE_PROGMEM 35 | #define FASTLED_USE_PROGMEM 1 36 | #endif 37 | 38 | #if defined(ARDUINO_AVR_DIGISPARK) || defined(ARDUINO_AVR_DIGISPARKPRO) 39 | #ifndef NO_CORRECTION 40 | #define NO_CORRECTION 1 41 | #endif 42 | #endif 43 | 44 | extern "C" { 45 | # if defined(CORE_TEENSY) || defined(TEENSYDUINO) 46 | extern volatile unsigned long timer0_millis_count; 47 | # define MS_COUNTER timer0_millis_count 48 | # else 49 | extern volatile unsigned long timer0_millis; 50 | # define MS_COUNTER timer0_millis 51 | # endif 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/led_sysdefs.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LED_SYSDEFS_H 2 | #define __INC_LED_SYSDEFS_H 3 | 4 | #include "FastLED.h" 5 | 6 | #include "fastled_config.h" 7 | 8 | #if defined(NRF51) || defined(__RFduino__) || defined (__Simblee__) 9 | #include "platforms/arm/nrf51/led_sysdefs_arm_nrf51.h" 10 | #elif defined(__MK20DX128__) || defined(__MK20DX256__) 11 | // Include k20/T3 headers 12 | #include "platforms/arm/k20/led_sysdefs_arm_k20.h" 13 | #elif defined(__MK66FX1M0__) 14 | // Include k66/T3.6 headers 15 | #include "platforms/arm/k66/led_sysdefs_arm_k66.h" 16 | #elif defined(__MKL26Z64__) 17 | // Include kl26/T-LC headers 18 | #include "platforms/arm/kl26/led_sysdefs_arm_kl26.h" 19 | #elif defined(__SAM3X8E__) 20 | // Include sam/due headers 21 | #include "platforms/arm/sam/led_sysdefs_arm_sam.h" 22 | #elif defined(STM32F10X_MD) 23 | #include "platforms/arm/stm32/led_sysdefs_arm_stm32.h" 24 | #elif defined(__SAMD21G18A__) || defined(__SAMD21J18A__) || defined(__SAMD21E17A__) || defined(__SAMD21E18A__) 25 | #include "platforms/arm/d21/led_sysdefs_arm_d21.h" 26 | #elif defined(ESP8266) 27 | #include "platforms/esp/8266/led_sysdefs_esp8266.h" 28 | #else 29 | // AVR platforms 30 | #include "platforms/avr/led_sysdefs_avr.h" 31 | #endif 32 | 33 | #ifndef FASTLED_NAMESPACE_BEGIN 34 | #define FASTLED_NAMESPACE_BEGIN 35 | #define FASTLED_NAMESPACE_END 36 | #define FASTLED_USING_NAMESPACE 37 | #endif 38 | 39 | // Arduino.h needed for convenience functions digitalPinToPort/BitMask/portOutputRegister and the pinMode methods. 40 | #ifdef ARDUINO 41 | #include 42 | #endif 43 | 44 | #define CLKS_PER_US (F_CPU/1000000) 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/examples/Spin/Spin.pde: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI ) 6 | int numberOfHorizontalDisplays = 1; 7 | int numberOfVerticalDisplays = 1; 8 | 9 | Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays); 10 | 11 | void setup() { 12 | matrix.setIntensity(0); 13 | 14 | // Adjust to your own needs 15 | // matrix.setPosition(0, 0, 0); // The first display is at <0, 0> 16 | // matrix.setPosition(1, 1, 0); // The second display is at <1, 0> 17 | // matrix.setPosition(2, 2, 0); // The third display is at <2, 0> 18 | // matrix.setPosition(3, 3, 0); // And the last display is at <3, 0> 19 | // ... 20 | // matrix.setRotation(0, 2); // The first display is position upside down 21 | // matrix.setRotation(3, 2); // The same hold for the last display 22 | } 23 | 24 | int wait = 50; 25 | int inc = -2; 26 | 27 | void loop() { 28 | 29 | for ( int x = 0; x < matrix.width() - 1; x++ ) { 30 | matrix.fillScreen(LOW); 31 | matrix.drawLine(x, 0, matrix.width() - 1 - x, matrix.height() - 1, HIGH); 32 | matrix.write(); // Send bitmap to display 33 | delay(wait); 34 | } 35 | 36 | for ( int y = 0; y < matrix.height() - 1; y++ ) { 37 | matrix.fillScreen(LOW); 38 | matrix.drawLine(matrix.width() - 1, y, 0, matrix.height() - 1 - y, HIGH); 39 | matrix.write(); // Send bitmap to display 40 | delay(wait); 41 | } 42 | 43 | wait = wait + inc; 44 | if ( wait == 0 ) inc = 2; 45 | if ( wait == 50 ) inc = -2; 46 | } 47 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/fastspi_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTSPI_TYPES_H 2 | #define __INC_FASTSPI_TYPES_H 3 | 4 | #include "FastLED.h" 5 | 6 | FASTLED_NAMESPACE_BEGIN 7 | 8 | // Some helper macros for getting at mis-ordered byte values 9 | #define SPI_B0 (RGB_BYTE0(RGB_ORDER) + (MASK_SKIP_BITS & SKIP)) 10 | #define SPI_B1 (RGB_BYTE1(RGB_ORDER) + (MASK_SKIP_BITS & SKIP)) 11 | #define SPI_B2 (RGB_BYTE2(RGB_ORDER) + (MASK_SKIP_BITS & SKIP)) 12 | #define SPI_ADVANCE (3 + (MASK_SKIP_BITS & SKIP)) 13 | 14 | /// Some of the SPI controllers will need to perform a transform on each byte before doing 15 | /// anyting with it. Creating a class of this form and passing it in as a template parameter to 16 | /// writeBytes/writeBytes3 below will ensure that the body of this method will get called on every 17 | /// byte worked on. Recommendation, make the adjust method aggressively inlined. 18 | /// 19 | /// TODO: Convinience macro for building these 20 | class DATA_NOP { 21 | public: 22 | static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data) { return data; } 23 | static __attribute__((always_inline)) inline uint8_t adjust(register uint8_t data, register uint8_t scale) { return scale8(data, scale); } 24 | static __attribute__((always_inline)) inline void postBlock(int /* len */) { } 25 | }; 26 | 27 | #define FLAG_START_BIT 0x80 28 | #define MASK_SKIP_BITS 0x3F 29 | 30 | // Clock speed dividers 31 | #define SPEED_DIV_2 2 32 | #define SPEED_DIV_4 4 33 | #define SPEED_DIV_8 8 34 | #define SPEED_DIV_16 16 35 | #define SPEED_DIV_32 32 36 | #define SPEED_DIV_64 64 37 | #define SPEED_DIV_128 128 38 | 39 | #define MAX_DATA_RATE 0 40 | 41 | FASTLED_NAMESPACE_END 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Multiple/MirroringSample/MirroringSample.ino: -------------------------------------------------------------------------------- 1 | // MirroringSample - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on 2 | // using multiple controllers. In this example, we're going to set up four NEOPIXEL strips on four 3 | // different pins, and show the same thing on all four of them, a simple bouncing dot/cyclon type pattern 4 | 5 | #include "FastLED.h" 6 | 7 | #define NUM_LEDS_PER_STRIP 60 8 | CRGB leds[NUM_LEDS_PER_STRIP]; 9 | 10 | // For mirroring strips, all the "special" stuff happens just in setup. We 11 | // just addLeds multiple times, once for each strip 12 | void setup() { 13 | // tell FastLED there's 60 NEOPIXEL leds on pin 4 14 | FastLED.addLeds(leds, NUM_LEDS_PER_STRIP); 15 | 16 | // tell FastLED there's 60 NEOPIXEL leds on pin 5 17 | FastLED.addLeds(leds, NUM_LEDS_PER_STRIP); 18 | 19 | // tell FastLED there's 60 NEOPIXEL leds on pin 6 20 | FastLED.addLeds(leds, NUM_LEDS_PER_STRIP); 21 | 22 | // tell FastLED there's 60 NEOPIXEL leds on pin 7 23 | FastLED.addLeds(leds, NUM_LEDS_PER_STRIP); 24 | } 25 | 26 | void loop() { 27 | for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) { 28 | // set our current dot to red 29 | leds[i] = CRGB::Red; 30 | FastLED.show(); 31 | // clear our current dot before we move on 32 | leds[i] = CRGB::Black; 33 | delay(100); 34 | } 35 | 36 | for(int i = NUM_LEDS_PER_STRIP-1; i >= 0; i--) { 37 | // set our current dot to red 38 | leds[i] = CRGB::Red; 39 | FastLED.show(); 40 | // clear our current dot before we move on 41 | leds[i] = CRGB::Black; 42 | delay(100); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Libraries/FHT/hann_128.inc: -------------------------------------------------------------------------------- 1 | // hann_128.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // lookup values for a hann window 4 | // signed 16b format 5 | 6 | 0, 7 | 20, 8 | 80, 9 | 180, 10 | 320, 11 | 499, 12 | 717, 13 | 973, 14 | 1267, 15 | 1597, 16 | 1965, 17 | 2367, 18 | 2804, 19 | 3273, 20 | 3775, 21 | 4308, 22 | 4871, 23 | 5461, 24 | 6078, 25 | 6721, 26 | 7387, 27 | 8075, 28 | 8784, 29 | 9511, 30 | 10255, 31 | 11014, 32 | 11786, 33 | 12569, 34 | 13362, 35 | 14162, 36 | 14967, 37 | 15776, 38 | 16587, 39 | 17397, 40 | 18204, 41 | 19007, 42 | 19804, 43 | 20592, 44 | 21370, 45 | 22136, 46 | 22887, 47 | 23623, 48 | 24341, 49 | 25039, 50 | 25717, 51 | 26371, 52 | 27001, 53 | 27606, 54 | 28182, 55 | 28730, 56 | 29247, 57 | 29734, 58 | 30187, 59 | 30607, 60 | 30991, 61 | 31341, 62 | 31653, 63 | 31928, 64 | 32165, 65 | 32364, 66 | 32523, 67 | 32643, 68 | 32723, 69 | 32763, 70 | 32763, 71 | 32723, 72 | 32643, 73 | 32523, 74 | 32364, 75 | 32165, 76 | 31928, 77 | 31653, 78 | 31341, 79 | 30991, 80 | 30607, 81 | 30187, 82 | 29734, 83 | 29247, 84 | 28730, 85 | 28182, 86 | 27606, 87 | 27001, 88 | 26371, 89 | 25717, 90 | 25039, 91 | 24341, 92 | 23623, 93 | 22887, 94 | 22136, 95 | 21370, 96 | 20592, 97 | 19804, 98 | 19007, 99 | 18204, 100 | 17397, 101 | 16587, 102 | 15776, 103 | 14967, 104 | 14162, 105 | 13362, 106 | 12569, 107 | 11786, 108 | 11014, 109 | 10255, 110 | 9511, 111 | 8784, 112 | 8075, 113 | 7387, 114 | 6721, 115 | 6078, 116 | 5461, 117 | 4871, 118 | 4308, 119 | 3775, 120 | 3273, 121 | 2804, 122 | 2367, 123 | 1965, 124 | 1597, 125 | 1267, 126 | 973, 127 | 717, 128 | 499, 129 | 320, 130 | 180, 131 | 80, 132 | 20, 133 | 0, 134 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Cylon/Cylon.ino: -------------------------------------------------------------------------------- 1 | #include "FastLED.h" 2 | 3 | // How many leds in your strip? 4 | #define NUM_LEDS 64 5 | 6 | // For led chips like Neopixels, which have a data line, ground, and power, you just 7 | // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, 8 | // ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN 9 | #define DATA_PIN 7 10 | #define CLOCK_PIN 13 11 | 12 | // Define the array of leds 13 | CRGB leds[NUM_LEDS]; 14 | 15 | void setup() { 16 | Serial.begin(57600); 17 | Serial.println("resetting"); 18 | LEDS.addLeds(leds,NUM_LEDS); 19 | LEDS.setBrightness(84); 20 | } 21 | 22 | void fadeall() { for(int i = 0; i < NUM_LEDS; i++) { leds[i].nscale8(250); } } 23 | 24 | void loop() { 25 | static uint8_t hue = 0; 26 | Serial.print("x"); 27 | // First slide the led in one direction 28 | for(int i = 0; i < NUM_LEDS; i++) { 29 | // Set the i'th led to red 30 | leds[i] = CHSV(hue++, 255, 255); 31 | // Show the leds 32 | FastLED.show(); 33 | // now that we've shown the leds, reset the i'th led to black 34 | // leds[i] = CRGB::Black; 35 | fadeall(); 36 | // Wait a little bit before we loop around and do it again 37 | delay(10); 38 | } 39 | Serial.print("x"); 40 | 41 | // Now go in the other direction. 42 | for(int i = (NUM_LEDS)-1; i >= 0; i--) { 43 | // Set the i'th led to red 44 | leds[i] = CHSV(hue++, 255, 255); 45 | // Show the leds 46 | FastLED.show(); 47 | // now that we've shown the leds, reset the i'th led to black 48 | // leds[i] = CRGB::Black; 49 | fadeall(); 50 | // Wait a little bit before we loop around and do it again 51 | delay(10); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Libraries/FHT/examples/fht_adc/fht_adc.pde: -------------------------------------------------------------------------------- 1 | /* 2 | fht_adc.pde 3 | guest openmusiclabs.com 9.5.12 4 | example sketch for testing the fht library. 5 | it takes in data on ADC0 (Analog0) and processes them 6 | with the fht. the data is sent out over the serial 7 | port at 115.2kb. there is a pure data patch for 8 | visualizing the data. 9 | */ 10 | 11 | #define LOG_OUT 1 // use the log output function 12 | #define FHT_N 256 // set to 256 point fht 13 | 14 | #include // include the library 15 | 16 | void setup() { 17 | Serial.begin(115200); // use the serial port 18 | TIMSK0 = 0; // turn off timer0 for lower jitter 19 | ADCSRA = 0xe5; // set the adc to free running mode 20 | ADMUX = 0x40; // use adc0 21 | DIDR0 = 0x01; // turn off the digital input for adc0 22 | } 23 | 24 | void loop() { 25 | while(1) { // reduces jitter 26 | cli(); // UDRE interrupt slows this way down on arduino1.0 27 | for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples 28 | while(!(ADCSRA & 0x10)); // wait for adc to be ready 29 | ADCSRA = 0xf5; // restart adc 30 | byte m = ADCL; // fetch adc data 31 | byte j = ADCH; 32 | int k = (j << 8) | m; // form into an int 33 | k -= 0x0200; // form into a signed int 34 | k <<= 6; // form into a 16b signed int 35 | fht_input[i] = k; // put real data into bins 36 | } 37 | fht_window(); // window the data for better frequency response 38 | fht_reorder(); // reorder the data before doing the fht 39 | fht_run(); // process the data in the fht 40 | fht_mag_log(); // take the output of the fht 41 | sei(); 42 | Serial.write(255); // send a start byte 43 | Serial.write(fht_log_out, FHT_N/2); // send out the data 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Libraries/FHT/examples/fht_adc_serial/fht_adc_serial.pde: -------------------------------------------------------------------------------- 1 | /* 2 | fht_adc_serial.pde 3 | guest openmusiclabs.com 7.7.14 4 | example sketch for testing the fht library. 5 | it takes in data on ADC0 (Analog0) and processes them 6 | with the fht. the data is sent out over the serial 7 | port at 115.2kb. 8 | */ 9 | 10 | #define LOG_OUT 1 // use the log output function 11 | #define FHT_N 256 // set to 256 point fht 12 | 13 | #include // include the library 14 | 15 | void setup() { 16 | Serial.begin(115200); // use the serial port 17 | TIMSK0 = 0; // turn off timer0 for lower jitter 18 | ADCSRA = 0xe5; // set the adc to free running mode 19 | ADMUX = 0x40; // use adc0 20 | DIDR0 = 0x01; // turn off the digital input for adc0 21 | } 22 | 23 | void loop() { 24 | while(1) { // reduces jitter 25 | cli(); // UDRE interrupt slows this way down on arduino1.0 26 | for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples 27 | while(!(ADCSRA & 0x10)); // wait for adc to be ready 28 | ADCSRA = 0xf5; // restart adc 29 | byte m = ADCL; // fetch adc data 30 | byte j = ADCH; 31 | int k = (j << 8) | m; // form into an int 32 | k -= 0x0200; // form into a signed int 33 | k <<= 6; // form into a 16b signed int 34 | fht_input[i] = k; // put real data into bins 35 | } 36 | fht_window(); // window the data for better frequency response 37 | fht_reorder(); // reorder the data before doing the fht 38 | fht_run(); // process the data in the fht 39 | fht_mag_log(); // take the output of the fht 40 | sei(); 41 | Serial.println("start"); 42 | for (byte i = 0 ; i < FHT_N/2 ; i++) { 43 | Serial.println(fht_log_out[i]); // send out the data 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/Blink/Blink.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - Blink 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch prints "Hello World!" to the LCD and makes the 10 | cursor block blink. 11 | 12 | The circuit: 13 | * LCD RS pin to digital pin 12 14 | * LCD Enable pin to digital pin 11 15 | * LCD D4 pin to digital pin 5 16 | * LCD D5 pin to digital pin 4 17 | * LCD D6 pin to digital pin 3 18 | * LCD D7 pin to digital pin 2 19 | * LCD R/W pin to ground 20 | * 10K resistor: 21 | * ends to +5V and ground 22 | * wiper to LCD VO pin (pin 3) 23 | 24 | Library originally added 18 Apr 2008 25 | by David A. Mellis 26 | library modified 5 Jul 2009 27 | by Limor Fried (http://www.ladyada.net) 28 | example added 9 Jul 2009 29 | by Tom Igoe 30 | modified 22 Nov 2010 31 | by Tom Igoe 32 | 33 | This example code is in the public domain. 34 | 35 | http://www.arduino.cc/en/Tutorial/LiquidCrystalBlink 36 | 37 | */ 38 | 39 | // include the library code: 40 | #include 41 | 42 | // initialize the library with the numbers of the interface pins 43 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 44 | 45 | void setup() { 46 | // set up the LCD's number of columns and rows: 47 | lcd.begin(16, 2); 48 | // Print a message to the LCD. 49 | lcd.print("hello, world!"); 50 | } 51 | 52 | void loop() { 53 | // Turn off the blinking cursor: 54 | lcd.noBlink(); 55 | delay(3000); 56 | // Turn on the blinking cursor: 57 | lcd.blink(); 58 | delay(3000); 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/Cursor/Cursor.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - Cursor 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch prints "Hello World!" to the LCD and 10 | uses the cursor() and noCursor() methods to turn 11 | on and off the cursor. 12 | 13 | The circuit: 14 | * LCD RS pin to digital pin 12 15 | * LCD Enable pin to digital pin 11 16 | * LCD D4 pin to digital pin 5 17 | * LCD D5 pin to digital pin 4 18 | * LCD D6 pin to digital pin 3 19 | * LCD D7 pin to digital pin 2 20 | * LCD R/W pin to ground 21 | * 10K resistor: 22 | * ends to +5V and ground 23 | * wiper to LCD VO pin (pin 3) 24 | 25 | Library originally added 18 Apr 2008 26 | by David A. Mellis 27 | library modified 5 Jul 2009 28 | by Limor Fried (http://www.ladyada.net) 29 | example added 9 Jul 2009 30 | by Tom Igoe 31 | modified 22 Nov 2010 32 | by Tom Igoe 33 | 34 | This example code is in the public domain. 35 | 36 | http://www.arduino.cc/en/Tutorial/LiquidCrystalCursor 37 | 38 | */ 39 | 40 | // include the library code: 41 | #include 42 | 43 | // initialize the library with the numbers of the interface pins 44 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 45 | 46 | void setup() { 47 | // set up the LCD's number of columns and rows: 48 | lcd.begin(16, 2); 49 | // Print a message to the LCD. 50 | lcd.print("hello, world!"); 51 | } 52 | 53 | void loop() { 54 | // Turn off the cursor: 55 | lcd.noCursor(); 56 | delay(500); 57 | // Turn on the cursor: 58 | lcd.cursor(); 59 | delay(500); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Libraries/LedControl-master/examples/LCDemoCascadedDevices/LCDemoCascadedDevices.ino: -------------------------------------------------------------------------------- 1 | //We always have to include the library 2 | #include "LedControl.h" 3 | 4 | /* 5 | Now we need a LedControl to work with. 6 | ***** These pin numbers will probably not work with your hardware ***** 7 | pin 12 is connected to the DataIn 8 | pin 11 is connected to the CLK 9 | pin 10 is connected to LOAD 10 | ***** Please set the number of devices you have ***** 11 | But the maximum default of 8 MAX72XX wil also work. 12 | */ 13 | LedControl lc=LedControl(12,11,10,8); 14 | 15 | /* we always wait a bit between updates of the display */ 16 | unsigned long delaytime=500; 17 | 18 | /* 19 | This time we have more than one device. 20 | But all of them have to be initialized 21 | individually. 22 | */ 23 | void setup() { 24 | //we have already set the number of devices when we created the LedControl 25 | int devices=lc.getDeviceCount(); 26 | //we have to init all devices in a loop 27 | for(int address=0;address 2 | 3 | #define NUM_LEDS_PER_STRIP 64 4 | // Note: this can be 12 if you're using a teensy 3 and don't mind soldering the pads on the back 5 | #define NUM_STRIPS 16 6 | 7 | CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP]; 8 | 9 | // Pin layouts on the teensy 3/3.1: 10 | // WS2811_PORTD: 2,14,7,8,6,20,21,5 11 | // WS2811_PORTC: 15,22,23,9,10,13,11,12,28,27,29,30 (these last 4 are pads on the bottom of the teensy) 12 | // WS2811_PORTDC: 2,14,7,8,6,20,21,5,15,22,23,9,10,13,11,12 - 16 way parallel 13 | // 14 | // Pin layouts on the due 15 | // WS2811_PORTA: 69,68,61,60,59,100,58,31 (note: pin 100 only available on the digix) 16 | // WS2811_PORTB: 90,91,92,93,94,95,96,97 (note: only available on the digix) 17 | // WS2811_PORTD: 25,26,27,28,14,15,29,11 18 | // 19 | 20 | void setup() { 21 | // LEDS.addLeds(leds, NUM_LEDS_PER_STRIP); 22 | // LEDS.addLeds(leds, NUM_LEDS_PER_STRIP); 23 | // LEDS.addLeds(leds, NUM_LEDS_PER_STRIP).setCorrection(TypicalLEDStrip); 24 | LEDS.addLeds(leds, NUM_LEDS_PER_STRIP); 25 | LEDS.setBrightness(32); 26 | } 27 | 28 | void loop() { 29 | static uint8_t hue = 0; 30 | for(int i = 0; i < NUM_STRIPS; i++) { 31 | for(int j = 0; j < NUM_LEDS_PER_STRIP; j++) { 32 | leds[(i*NUM_LEDS_PER_STRIP) + j] = CHSV((32*i) + hue+j,192,255); 33 | } 34 | } 35 | 36 | // Set the first n leds on each strip to show which strip it is 37 | for(int i = 0; i < NUM_STRIPS; i++) { 38 | for(int j = 0; j <= i; j++) { 39 | leds[(i*NUM_LEDS_PER_STRIP) + j] = CRGB::Red; 40 | } 41 | } 42 | 43 | hue++; 44 | 45 | LEDS.show(); 46 | LEDS.delay(10); 47 | } 48 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/Display/Display.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - display() and noDisplay() 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch prints "Hello World!" to the LCD and uses the 10 | display() and noDisplay() functions to turn on and off 11 | the display. 12 | 13 | The circuit: 14 | * LCD RS pin to digital pin 12 15 | * LCD Enable pin to digital pin 11 16 | * LCD D4 pin to digital pin 5 17 | * LCD D5 pin to digital pin 4 18 | * LCD D6 pin to digital pin 3 19 | * LCD D7 pin to digital pin 2 20 | * LCD R/W pin to ground 21 | * 10K resistor: 22 | * ends to +5V and ground 23 | * wiper to LCD VO pin (pin 3) 24 | 25 | Library originally added 18 Apr 2008 26 | by David A. Mellis 27 | library modified 5 Jul 2009 28 | by Limor Fried (http://www.ladyada.net) 29 | example added 9 Jul 2009 30 | by Tom Igoe 31 | modified 22 Nov 2010 32 | by Tom Igoe 33 | 34 | This example code is in the public domain. 35 | 36 | http://www.arduino.cc/en/Tutorial/LiquidCrystalDisplay 37 | 38 | */ 39 | 40 | // include the library code: 41 | #include 42 | 43 | // initialize the library with the numbers of the interface pins 44 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 45 | 46 | void setup() { 47 | // set up the LCD's number of columns and rows: 48 | lcd.begin(16, 2); 49 | // Print a message to the LCD. 50 | lcd.print("hello, world!"); 51 | } 52 | 53 | void loop() { 54 | // Turn off the display: 55 | lcd.noDisplay(); 56 | delay(500); 57 | // Turn on the display: 58 | lcd.display(); 59 | delay(500); 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/dmx.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_DMX_H 2 | #define __INC_DMX_H 3 | 4 | #include "FastLED.h" 5 | 6 | #ifdef DmxSimple_h 7 | #include 8 | #define HAS_DMX_SIMPLE 9 | 10 | ///@ingroup chipsets 11 | ///@{ 12 | FASTLED_NAMESPACE_BEGIN 13 | 14 | // note - dmx simple must be included before FastSPI for this code to be enabled 15 | template class DMXSimpleController : public CPixelLEDController { 16 | public: 17 | // initialize the LED controller 18 | virtual void init() { DmxSimple.usePin(DATA_PIN); } 19 | 20 | protected: 21 | virtual void showPixels(PixelController & pixels) { 22 | int iChannel = 1; 23 | while(pixels.has(1)) { 24 | DmxSimple.write(iChannel++, pixels.loadAndScale0()); 25 | DmxSimple.write(iChannel++, pixels.loadAndScale1()); 26 | DmxSimple.write(iChannel++, pixels.loadAndScale2()); 27 | pixels.advanceData(); 28 | pixels.stepDithering(); 29 | } 30 | } 31 | }; 32 | 33 | FASTLED_NAMESPACE_END 34 | 35 | #endif 36 | 37 | #ifdef DmxSerial_h 38 | #include 39 | 40 | FASTLED_NAMESPACE_BEGIN 41 | 42 | template class DMXSerialController : public CPixelLEDController { 43 | public: 44 | // initialize the LED controller 45 | virtual void init() { DMXSerial.init(DMXController); } 46 | 47 | virtual void showPixels(PixelController & pixels) { 48 | int iChannel = 1; 49 | while(pixels.has(1)) { 50 | DMXSerial.write(iChannel++, pixels.loadAndScale0()); 51 | DMXSerial.write(iChannel++, pixels.loadAndScale1()); 52 | DMXSerial.write(iChannel++, pixels.loadAndScale2()); 53 | pixels.advanceData(); 54 | pixels.stepDithering(); 55 | } 56 | } 57 | }; 58 | 59 | FASTLED_NAMESPACE_END 60 | ///@} 61 | 62 | #define HAS_DMX_SERIAL 63 | #endif 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - Hello World 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch prints "Hello World!" to the LCD 10 | and shows the time. 11 | 12 | The circuit: 13 | * LCD RS pin to digital pin 12 14 | * LCD Enable pin to digital pin 11 15 | * LCD D4 pin to digital pin 5 16 | * LCD D5 pin to digital pin 4 17 | * LCD D6 pin to digital pin 3 18 | * LCD D7 pin to digital pin 2 19 | * LCD R/W pin to ground 20 | * LCD VSS pin to ground 21 | * LCD VCC pin to 5V 22 | * 10K resistor: 23 | * ends to +5V and ground 24 | * wiper to LCD VO pin (pin 3) 25 | 26 | Library originally added 18 Apr 2008 27 | by David A. Mellis 28 | library modified 5 Jul 2009 29 | by Limor Fried (http://www.ladyada.net) 30 | example added 9 Jul 2009 31 | by Tom Igoe 32 | modified 22 Nov 2010 33 | by Tom Igoe 34 | 35 | This example code is in the public domain. 36 | 37 | http://www.arduino.cc/en/Tutorial/LiquidCrystal 38 | */ 39 | 40 | // include the library code: 41 | #include 42 | 43 | // initialize the library with the numbers of the interface pins 44 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 45 | 46 | void setup() { 47 | // set up the LCD's number of columns and rows: 48 | lcd.begin(16, 2); 49 | // Print a message to the LCD. 50 | lcd.print("hello, world!"); 51 | } 52 | 53 | void loop() { 54 | // set the cursor to column 0, line 1 55 | // (note: line 1 is the second row, since counting begins with 0): 56 | lcd.setCursor(0, 1); 57 | // print the number of seconds since reset: 58 | lcd.print(millis() / 1000); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/examples/Ticker/Ticker.pde: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI ) 6 | int numberOfHorizontalDisplays = 4; 7 | int numberOfVerticalDisplays = 1; 8 | 9 | Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays); 10 | 11 | String tape = "Arduino"; 12 | int wait = 20; // In milliseconds 13 | 14 | int spacer = 1; 15 | int width = 5 + spacer; // The font width is 5 pixels 16 | 17 | void setup() { 18 | 19 | matrix.setIntensity(7); // Use a value between 0 and 15 for brightness 20 | 21 | // Adjust to your own needs 22 | // matrix.setPosition(0, 0, 0); // The first display is at <0, 0> 23 | // matrix.setPosition(1, 1, 0); // The second display is at <1, 0> 24 | // matrix.setPosition(2, 2, 0); // The third display is at <2, 0> 25 | // matrix.setPosition(3, 3, 0); // And the last display is at <3, 0> 26 | // ... 27 | // matrix.setRotation(0, 2); // The first display is position upside down 28 | // matrix.setRotation(3, 2); // The same hold for the last display 29 | } 30 | 31 | void loop() { 32 | 33 | for ( int i = 0 ; i < width * tape.length() + matrix.width() - 1 - spacer; i++ ) { 34 | 35 | matrix.fillScreen(LOW); 36 | 37 | int letter = i / width; 38 | int x = (matrix.width() - 1) - i % width; 39 | int y = (matrix.height() - 8) / 2; // center the text vertically 40 | 41 | while ( x + width - spacer >= 0 && letter >= 0 ) { 42 | if ( letter < tape.length() ) { 43 | matrix.drawChar(x, y, tape[letter], HIGH, LOW, 1); 44 | } 45 | 46 | letter--; 47 | x -= width; 48 | } 49 | 50 | matrix.write(); // Send bitmap to display 51 | 52 | delay(wait); 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/k20/octows2811_controller.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_OCTOWS2811_CONTROLLER_H 2 | #define __INC_OCTOWS2811_CONTROLLER_H 3 | 4 | #ifdef USE_OCTOWS2811 5 | 6 | // #include "OctoWS2811.h" 7 | 8 | FASTLED_NAMESPACE_BEGIN 9 | 10 | template 11 | class COctoWS2811Controller : public CPixelLEDController { 12 | OctoWS2811 *pocto; 13 | uint8_t *drawbuffer,*framebuffer; 14 | 15 | void _init(int nLeds) { 16 | if(pocto == NULL) { 17 | drawbuffer = (uint8_t*)malloc(nLeds * 8 * 3); 18 | framebuffer = (uint8_t*)malloc(nLeds * 8 * 3); 19 | 20 | // byte ordering is handled in show by the pixel controller 21 | int config = WS2811_RGB; 22 | config |= CHIP; 23 | 24 | pocto = new OctoWS2811(nLeds, framebuffer, drawbuffer, config); 25 | 26 | pocto->begin(); 27 | } 28 | } 29 | public: 30 | COctoWS2811Controller() { pocto = NULL; } 31 | 32 | 33 | virtual void init() { /* do nothing yet */ } 34 | 35 | typedef union { 36 | uint8_t bytes[8]; 37 | uint32_t raw[2]; 38 | } Lines; 39 | 40 | virtual void showPixels(PixelController & pixels) { 41 | _init(pixels.size()); 42 | 43 | uint8_t *pData = drawbuffer; 44 | while(pixels.has(1)) { 45 | Lines b; 46 | 47 | for(int i = 0; i < 8; i++) { b.bytes[i] = pixels.loadAndScale0(i); } 48 | transpose8x1_MSB(b.bytes,pData); pData += 8; 49 | for(int i = 0; i < 8; i++) { b.bytes[i] = pixels.loadAndScale1(i); } 50 | transpose8x1_MSB(b.bytes,pData); pData += 8; 51 | for(int i = 0; i < 8; i++) { b.bytes[i] = pixels.loadAndScale2(i); } 52 | transpose8x1_MSB(b.bytes,pData); pData += 8; 53 | pixels.stepDithering(); 54 | pixels.advanceData(); 55 | } 56 | 57 | pocto->show(); 58 | } 59 | 60 | }; 61 | 62 | FASTLED_NAMESPACE_END 63 | 64 | #endif 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Multiple/MultiArrays/MultiArrays.ino: -------------------------------------------------------------------------------- 1 | // MultiArrays - see https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples for more info on 2 | // using multiple controllers. In this example, we're going to set up three NEOPIXEL strips on three 3 | // different pins, each strip getting its own CRGB array to be played with 4 | 5 | #include "FastLED.h" 6 | 7 | #define NUM_LEDS_PER_STRIP 60 8 | CRGB redLeds[NUM_LEDS_PER_STRIP]; 9 | CRGB greenLeds[NUM_LEDS_PER_STRIP]; 10 | CRGB blueLeds[NUM_LEDS_PER_STRIP]; 11 | 12 | // For mirroring strips, all the "special" stuff happens just in setup. We 13 | // just addLeds multiple times, once for each strip 14 | void setup() { 15 | // tell FastLED there's 60 NEOPIXEL leds on pin 10 16 | FastLED.addLeds(redLeds, NUM_LEDS_PER_STRIP); 17 | 18 | // tell FastLED there's 60 NEOPIXEL leds on pin 11 19 | FastLED.addLeds(greenLeds, NUM_LEDS_PER_STRIP); 20 | 21 | // tell FastLED there's 60 NEOPIXEL leds on pin 12 22 | FastLED.addLeds(blueLeds, NUM_LEDS_PER_STRIP); 23 | 24 | } 25 | 26 | void loop() { 27 | for(int i = 0; i < NUM_LEDS_PER_STRIP; i++) { 28 | // set our current dot to red, green, and blue 29 | redLeds[i] = CRGB::Red; 30 | greenLeds[i] = CRGB::Green; 31 | blueLeds[i] = CRGB::Blue; 32 | FastLED.show(); 33 | // clear our current dot before we move on 34 | redLeds[i] = CRGB::Black; 35 | greenLeds[i] = CRGB::Black; 36 | blueLeds[i] = CRGB::Blue; 37 | delay(100); 38 | } 39 | 40 | for(int i = NUM_LEDS_PER_STRIP-1; i >= 0; i--) { 41 | // set our current dot to red, green, and blue 42 | redLeds[i] = CRGB::Red; 43 | greenLeds[i] = CRGB::Green; 44 | blueLeds[i] = CRGB::Blue; 45 | FastLED.show(); 46 | // clear our current dot before we move on 47 | redLeds[i] = CRGB::Black; 48 | greenLeds[i] = CRGB::Black; 49 | blueLeds[i] = CRGB::Blue; 50 | delay(100); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal_I2C-master/examples/CustomChars/CustomChars.pde: -------------------------------------------------------------------------------- 1 | //YWROBOT 2 | //Compatible with the Arduino IDE 1.0 3 | //Library version:1.1 4 | #include 5 | #include 6 | 7 | #if defined(ARDUINO) && ARDUINO >= 100 8 | #define printByte(args) write(args); 9 | #else 10 | #define printByte(args) print(args,BYTE); 11 | #endif 12 | 13 | uint8_t bell[8] = {0x4,0xe,0xe,0xe,0x1f,0x0,0x4}; 14 | uint8_t note[8] = {0x2,0x3,0x2,0xe,0x1e,0xc,0x0}; 15 | uint8_t clock[8] = {0x0,0xe,0x15,0x17,0x11,0xe,0x0}; 16 | uint8_t heart[8] = {0x0,0xa,0x1f,0x1f,0xe,0x4,0x0}; 17 | uint8_t duck[8] = {0x0,0xc,0x1d,0xf,0xf,0x6,0x0}; 18 | uint8_t check[8] = {0x0,0x1,0x3,0x16,0x1c,0x8,0x0}; 19 | uint8_t cross[8] = {0x0,0x1b,0xe,0x4,0xe,0x1b,0x0}; 20 | uint8_t retarrow[8] = { 0x1,0x1,0x5,0x9,0x1f,0x8,0x4}; 21 | 22 | LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display 23 | 24 | void setup() 25 | { 26 | lcd.init(); // initialize the lcd 27 | lcd.backlight(); 28 | 29 | lcd.createChar(0, bell); 30 | lcd.createChar(1, note); 31 | lcd.createChar(2, clock); 32 | lcd.createChar(3, heart); 33 | lcd.createChar(4, duck); 34 | lcd.createChar(5, check); 35 | lcd.createChar(6, cross); 36 | lcd.createChar(7, retarrow); 37 | lcd.home(); 38 | 39 | lcd.print("Hello world..."); 40 | lcd.setCursor(0, 1); 41 | lcd.print(" i "); 42 | lcd.printByte(3); 43 | lcd.print(" arduinos!"); 44 | delay(5000); 45 | displayKeyCodes(); 46 | 47 | } 48 | 49 | // display all keycodes 50 | void displayKeyCodes(void) { 51 | uint8_t i = 0; 52 | while (1) { 53 | lcd.clear(); 54 | lcd.print("Codes 0x"); lcd.print(i, HEX); 55 | lcd.print("-0x"); lcd.print(i+16, HEX); 56 | lcd.setCursor(0, 1); 57 | for (int j=0; j<16; j++) { 58 | lcd.printByte(i+j); 59 | } 60 | i+=16; 61 | 62 | delay(4000); 63 | } 64 | } 65 | 66 | void loop() 67 | { 68 | 69 | } 70 | 71 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - Serial Input 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch displays text sent over the serial port 10 | (e.g. from the Serial Monitor) on an attached LCD. 11 | 12 | The circuit: 13 | * LCD RS pin to digital pin 12 14 | * LCD Enable pin to digital pin 11 15 | * LCD D4 pin to digital pin 5 16 | * LCD D5 pin to digital pin 4 17 | * LCD D6 pin to digital pin 3 18 | * LCD D7 pin to digital pin 2 19 | * LCD R/W pin to ground 20 | * 10K resistor: 21 | * ends to +5V and ground 22 | * wiper to LCD VO pin (pin 3) 23 | 24 | Library originally added 18 Apr 2008 25 | by David A. Mellis 26 | library modified 5 Jul 2009 27 | by Limor Fried (http://www.ladyada.net) 28 | example added 9 Jul 2009 29 | by Tom Igoe 30 | modified 22 Nov 2010 31 | by Tom Igoe 32 | 33 | This example code is in the public domain. 34 | 35 | http://www.arduino.cc/en/Tutorial/LiquidCrystalSerial 36 | */ 37 | 38 | // include the library code: 39 | #include 40 | 41 | // initialize the library with the numbers of the interface pins 42 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 43 | 44 | void setup() { 45 | // set up the LCD's number of columns and rows: 46 | lcd.begin(16, 2); 47 | // initialize the serial communications: 48 | Serial.begin(9600); 49 | } 50 | 51 | void loop() { 52 | // when characters arrive over the serial port... 53 | if (Serial.available()) { 54 | // wait a bit for the entire message to arrive 55 | delay(100); 56 | // clear the screen 57 | lcd.clear(); 58 | // read all the available characters 59 | while (Serial.available() > 0) { 60 | // display each character to the LCD 61 | lcd.write(Serial.read()); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/examples/MadFly/MadFly.pde: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI ) 6 | int numberOfHorizontalDisplays = 1; 7 | int numberOfVerticalDisplays = 1; 8 | 9 | Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays); 10 | 11 | int pinRandom = A0; 12 | 13 | int wait = 20; // In milliseconds 14 | 15 | void setup() { 16 | matrix.setIntensity(4); // Set brightness between 0 and 15 17 | 18 | // Adjust to your own needs 19 | // matrix.setPosition(0, 0, 0); // The first display is at <0, 0> 20 | // matrix.setPosition(1, 1, 0); // The second display is at <1, 0> 21 | // matrix.setPosition(2, 2, 0); // The third display is at <2, 0> 22 | // matrix.setPosition(3, 3, 0); // And the last display is at <3, 0> 23 | // ... 24 | // matrix.setRotation(0, 2); // The first display is position upside down 25 | // matrix.setRotation(3, 2); // The same hold for the last display 26 | 27 | randomSeed(analogRead(pinRandom)); // Initialize random generator 28 | } 29 | 30 | int x = numberOfHorizontalDisplays * 8 / 2; 31 | int y = numberOfVerticalDisplays * 8 / 2; 32 | int xNext, yNext; 33 | 34 | void loop() { 35 | 36 | matrix.drawPixel(x, y, HIGH); 37 | matrix.write(); // Send bitmap to display 38 | 39 | delay(wait); 40 | 41 | matrix.drawPixel(x, y, LOW); // Erase the old position of our dot 42 | 43 | do { 44 | switch ( random(4) ) { 45 | case 0: xNext = constrain(x + 1, 0, matrix.width() - 1); yNext = y; break; 46 | case 1: xNext = constrain(x - 1, 0, matrix.width() - 1); yNext = y; break; 47 | case 2: yNext = constrain(y + 1, 0, matrix.height() - 1); xNext = x; break; 48 | case 3: yNext = constrain(y - 1, 0, matrix.height() - 1); xNext = x; break; 49 | } 50 | } 51 | while ( x == xNext && y == yNext ); // Repeat until we find a new coordinate 52 | 53 | x = xNext; 54 | y = yNext; 55 | } 56 | -------------------------------------------------------------------------------- /Libraries/LedControl-master/examples/LCDemo7Segment/LCDemo7Segment.ino: -------------------------------------------------------------------------------- 1 | //We always have to include the library 2 | #include "LedControl.h" 3 | 4 | /* 5 | Now we need a LedControl to work with. 6 | ***** These pin numbers will probably not work with your hardware ***** 7 | pin 12 is connected to the DataIn 8 | pin 11 is connected to the CLK 9 | pin 10 is connected to LOAD 10 | We have only a single MAX72XX. 11 | */ 12 | LedControl lc=LedControl(12,11,10,1); 13 | 14 | /* we always wait a bit between updates of the display */ 15 | unsigned long delaytime=250; 16 | 17 | void setup() { 18 | /* 19 | The MAX72XX is in power-saving mode on startup, 20 | we have to do a wakeup call 21 | */ 22 | lc.shutdown(0,false); 23 | /* Set the brightness to a medium values */ 24 | lc.setIntensity(0,8); 25 | /* and clear the display */ 26 | lc.clearDisplay(0); 27 | } 28 | 29 | 30 | /* 31 | This method will display the characters for the 32 | word "Arduino" one after the other on digit 0. 33 | */ 34 | void writeArduinoOn7Segment() { 35 | lc.setChar(0,0,'a',false); 36 | delay(delaytime); 37 | lc.setRow(0,0,0x05); 38 | delay(delaytime); 39 | lc.setChar(0,0,'d',false); 40 | delay(delaytime); 41 | lc.setRow(0,0,0x1c); 42 | delay(delaytime); 43 | lc.setRow(0,0,B00010000); 44 | delay(delaytime); 45 | lc.setRow(0,0,0x15); 46 | delay(delaytime); 47 | lc.setRow(0,0,0x1D); 48 | delay(delaytime); 49 | lc.clearDisplay(0); 50 | delay(delaytime); 51 | } 52 | 53 | /* 54 | This method will scroll all the hexa-decimal 55 | numbers and letters on the display. You will need at least 56 | four 7-Segment digits. otherwise it won't really look that good. 57 | */ 58 | void scrollDigits() { 59 | for(int i=0;i<13;i++) { 60 | lc.setDigit(0,3,i,false); 61 | lc.setDigit(0,2,i+1,false); 62 | lc.setDigit(0,1,i+2,false); 63 | lc.setDigit(0,0,i+3,false); 64 | delay(delaytime); 65 | } 66 | lc.clearDisplay(0); 67 | delay(delaytime); 68 | } 69 | 70 | void loop() { 71 | writeArduinoOn7Segment(); 72 | scrollDigits(); 73 | } 74 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/AnalogOutput/AnalogOutput.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Example showing how to use FastLED color functions 4 | // even when you're NOT using a "pixel-addressible" smart LED strip. 5 | // 6 | // This example is designed to control an "analog" RGB LED strip 7 | // (or a single RGB LED) being driven by Arduino PWM output pins. 8 | // So this code never calls FastLED.addLEDs() or FastLED.show(). 9 | // 10 | // This example illustrates one way you can use just the portions 11 | // of FastLED that you need. In this case, this code uses just the 12 | // fast HSV color conversion code. 13 | // 14 | // In this example, the RGB values are output on three separate 15 | // 'analog' PWM pins, one for red, one for green, and one for blue. 16 | 17 | #define REDPIN 5 18 | #define GREENPIN 6 19 | #define BLUEPIN 3 20 | 21 | // showAnalogRGB: this is like FastLED.show(), but outputs on 22 | // analog PWM output pins instead of sending data to an intelligent, 23 | // pixel-addressable LED strip. 24 | // 25 | // This function takes the incoming RGB values and outputs the values 26 | // on three analog PWM output pins to the r, g, and b values respectively. 27 | void showAnalogRGB( const CRGB& rgb) 28 | { 29 | analogWrite(REDPIN, rgb.r ); 30 | analogWrite(GREENPIN, rgb.g ); 31 | analogWrite(BLUEPIN, rgb.b ); 32 | } 33 | 34 | 35 | 36 | // colorBars: flashes Red, then Green, then Blue, then Black. 37 | // Helpful for diagnosing if you've mis-wired which is which. 38 | void colorBars() 39 | { 40 | showAnalogRGB( CRGB::Red ); delay(500); 41 | showAnalogRGB( CRGB::Green ); delay(500); 42 | showAnalogRGB( CRGB::Blue ); delay(500); 43 | showAnalogRGB( CRGB::Black ); delay(500); 44 | } 45 | 46 | void loop() 47 | { 48 | static uint8_t hue; 49 | hue = hue + 1; 50 | // Use FastLED automatic HSV->RGB conversion 51 | showAnalogRGB( CHSV( hue, 255, 255) ); 52 | 53 | delay(20); 54 | } 55 | 56 | 57 | void setup() { 58 | pinMode(REDPIN, OUTPUT); 59 | pinMode(GREENPIN, OUTPUT); 60 | pinMode(BLUEPIN, OUTPUT); 61 | 62 | // Flash the "hello" color sequence: R, G, B, black. 63 | colorBars(); 64 | } 65 | 66 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - Autoscroll 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch demonstrates the use of the autoscroll() 10 | and noAutoscroll() functions to make new text scroll or not. 11 | 12 | The circuit: 13 | * LCD RS pin to digital pin 12 14 | * LCD Enable pin to digital pin 11 15 | * LCD D4 pin to digital pin 5 16 | * LCD D5 pin to digital pin 4 17 | * LCD D6 pin to digital pin 3 18 | * LCD D7 pin to digital pin 2 19 | * LCD R/W pin to ground 20 | * 10K resistor: 21 | * ends to +5V and ground 22 | * wiper to LCD VO pin (pin 3) 23 | 24 | Library originally added 18 Apr 2008 25 | by David A. Mellis 26 | library modified 5 Jul 2009 27 | by Limor Fried (http://www.ladyada.net) 28 | example added 9 Jul 2009 29 | by Tom Igoe 30 | modified 22 Nov 2010 31 | by Tom Igoe 32 | 33 | This example code is in the public domain. 34 | 35 | http://www.arduino.cc/en/Tutorial/LiquidCrystalAutoscroll 36 | 37 | */ 38 | 39 | // include the library code: 40 | #include 41 | 42 | // initialize the library with the numbers of the interface pins 43 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 44 | 45 | void setup() { 46 | // set up the LCD's number of columns and rows: 47 | lcd.begin(16, 2); 48 | } 49 | 50 | void loop() { 51 | // set the cursor to (0,0): 52 | lcd.setCursor(0, 0); 53 | // print from 0 to 9: 54 | for (int thisChar = 0; thisChar < 10; thisChar++) { 55 | lcd.print(thisChar); 56 | delay(500); 57 | } 58 | 59 | // set the cursor to (16,1): 60 | lcd.setCursor(16, 1); 61 | // set the display to automatically scroll: 62 | lcd.autoscroll(); 63 | // print from 0 to 9: 64 | for (int thisChar = 0; thisChar < 10; thisChar++) { 65 | lcd.print(thisChar); 66 | delay(500); 67 | } 68 | // turn off automatic scrolling 69 | lcd.noAutoscroll(); 70 | 71 | // clear screen for the next loop: 72 | lcd.clear(); 73 | } 74 | 75 | -------------------------------------------------------------------------------- /Libraries/FHT/256_reorder.inc: -------------------------------------------------------------------------------- 1 | // 256_reorder.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // fft butterfly swap pairs 4 | // reorders input values for butterfly operations 5 | 6 | 240 , 15 , 7 | 248 , 31 , 8 | 244 , 47 , 9 | 252 , 63 , 10 | 242 , 79 , 11 | 250 , 95 , 12 | 246 , 111 , 13 | 254 , 127 , 14 | 241 , 143 , 15 | 249 , 159 , 16 | 245 , 175 , 17 | 253 , 191 , 18 | 243 , 207 , 19 | 251 , 223 , 20 | 247 , 239 , 21 | 224 , 7 , 22 | 232 , 23 , 23 | 228 , 39 , 24 | 236 , 55 , 25 | 226 , 71 , 26 | 234 , 87 , 27 | 230 , 103 , 28 | 238 , 119 , 29 | 225 , 135 , 30 | 233 , 151 , 31 | 229 , 167 , 32 | 237 , 183 , 33 | 227 , 199 , 34 | 235 , 215 , 35 | 208 , 11 , 36 | 216 , 27 , 37 | 212 , 43 , 38 | 220 , 59 , 39 | 210 , 75 , 40 | 218 , 91 , 41 | 214 , 107 , 42 | 222 , 123 , 43 | 209 , 139 , 44 | 217 , 155 , 45 | 213 , 171 , 46 | 221 , 187 , 47 | 211 , 203 , 48 | 192 , 3 , 49 | 200 , 19 , 50 | 196 , 35 , 51 | 204 , 51 , 52 | 194 , 67 , 53 | 202 , 83 , 54 | 198 , 99 , 55 | 206 , 115 , 56 | 193 , 131 , 57 | 201 , 147 , 58 | 197 , 163 , 59 | 205 , 179 , 60 | 176 , 13 , 61 | 184 , 29 , 62 | 180 , 45 , 63 | 188 , 61 , 64 | 178 , 77 , 65 | 186 , 93 , 66 | 182 , 109 , 67 | 190 , 125 , 68 | 177 , 141 , 69 | 185 , 157 , 70 | 181 , 173 , 71 | 160 , 5 , 72 | 168 , 21 , 73 | 164 , 37 , 74 | 172 , 53 , 75 | 162 , 69 , 76 | 170 , 85 , 77 | 166 , 101 , 78 | 174 , 117 , 79 | 161 , 133 , 80 | 169 , 149 , 81 | 144 , 9 , 82 | 152 , 25 , 83 | 148 , 41 , 84 | 156 , 57 , 85 | 146 , 73 , 86 | 154 , 89 , 87 | 150 , 105 , 88 | 158 , 121 , 89 | 145 , 137 , 90 | 128 , 1 , 91 | 136 , 17 , 92 | 132 , 33 , 93 | 140 , 49 , 94 | 130 , 65 , 95 | 138 , 81 , 96 | 134 , 97 , 97 | 142 , 113 , 98 | 112 , 14 , 99 | 120 , 30 , 100 | 116 , 46 , 101 | 124 , 62 , 102 | 114 , 78 , 103 | 122 , 94 , 104 | 118 , 110 , 105 | 96 , 6 , 106 | 104 , 22 , 107 | 100 , 38 , 108 | 108 , 54 , 109 | 98 , 70 , 110 | 106 , 86 , 111 | 80 , 10 , 112 | 88 , 26 , 113 | 84 , 42 , 114 | 92 , 58 , 115 | 82 , 74 , 116 | 64 , 2 , 117 | 72 , 18 , 118 | 68 , 34 , 119 | 76 , 50 , 120 | 48 , 12 , 121 | 56 , 28 , 122 | 52 , 44 , 123 | 32 , 4 , 124 | 40 , 20 , 125 | 16 , 8 , 126 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/colorpalettes.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_COLORPALETTES_H 2 | #define __INC_COLORPALETTES_H 3 | 4 | #include "FastLED.h" 5 | #include "colorutils.h" 6 | 7 | ///@file colorpalettes.h 8 | /// contains definitions for the predefined color palettes supplied by FastLED. 9 | 10 | FASTLED_NAMESPACE_BEGIN 11 | 12 | ///@defgroup Colorpalletes Pre-defined color palletes 13 | /// These schemes are all declared as "PROGMEM", meaning 14 | /// that they won't take up SRAM on AVR chips until used. 15 | /// Furthermore, the compiler won't even include these 16 | /// in your PROGMEM (flash) storage unless you specifically 17 | /// use each one, so you only 'pay for' those you actually use. 18 | 19 | ///@{ 20 | 21 | /// Cloudy color pallete 22 | extern const TProgmemRGBPalette16 CloudColors_p FL_PROGMEM; 23 | /// Lava colors 24 | extern const TProgmemRGBPalette16 LavaColors_p FL_PROGMEM; 25 | /// Ocean colors, blues and whites 26 | extern const TProgmemRGBPalette16 OceanColors_p FL_PROGMEM; 27 | /// Forest colors, greens 28 | extern const TProgmemRGBPalette16 ForestColors_p FL_PROGMEM; 29 | 30 | /// HSV Rainbow 31 | extern const TProgmemRGBPalette16 RainbowColors_p FL_PROGMEM; 32 | 33 | #define RainbowStripesColors_p RainbowStripeColors_p 34 | /// HSV Rainbow colors with alternatating stripes of black 35 | extern const TProgmemRGBPalette16 RainbowStripeColors_p FL_PROGMEM; 36 | 37 | /// HSV color ramp: blue purple ping red orange yellow (and back) 38 | /// Basically, everything but the greens, which tend to make 39 | /// people's skin look unhealthy. This palette is good for 40 | /// lighting at a club or party, where it'll be shining on people. 41 | extern const TProgmemRGBPalette16 PartyColors_p FL_PROGMEM; 42 | 43 | /// Approximate "black body radiation" palette, akin to 44 | /// the FastLED 'HeatColor' function. 45 | /// Recommend that you use values 0-240 rather than 46 | /// the usual 0-255, as the last 15 colors will be 47 | /// 'wrapping around' from the hot end to the cold end, 48 | /// which looks wrong. 49 | extern const TProgmemRGBPalette16 HeatColors_p FL_PROGMEM; 50 | 51 | 52 | DECLARE_GRADIENT_PALETTE( Rainbow_gp); 53 | 54 | FASTLED_NAMESPACE_END 55 | 56 | ///@} 57 | #endif 58 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/d21/clockless_arm_d21.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_CLOCKLESS_ARM_D21 2 | #define __INC_CLOCKLESS_ARM_D21 3 | 4 | #include "platforms/arm/common/m0clockless.h" 5 | FASTLED_NAMESPACE_BEGIN 6 | #define FASTLED_HAS_CLOCKLESS 1 7 | 8 | template 9 | class ClocklessController : public CPixelLEDController { 10 | typedef typename FastPinBB::port_ptr_t data_ptr_t; 11 | typedef typename FastPinBB::port_t data_t; 12 | 13 | data_t mPinMask; 14 | data_ptr_t mPort; 15 | CMinWait mWait; 16 | public: 17 | virtual void init() { 18 | FastPinBB::setOutput(); 19 | mPinMask = FastPinBB::mask(); 20 | mPort = FastPinBB::port(); 21 | } 22 | 23 | virtual uint16_t getMaxRefreshRate() const { return 400; } 24 | 25 | virtual void showPixels(PixelController & pixels) { 26 | mWait.wait(); 27 | cli(); 28 | if(!showRGBInternal(pixels)) { 29 | sei(); delayMicroseconds(WAIT_TIME); cli(); 30 | showRGBInternal(pixels); 31 | } 32 | sei(); 33 | mWait.mark(); 34 | } 35 | 36 | // This method is made static to force making register Y available to use for data on AVR - if the method is non-static, then 37 | // gcc will use register Y for the this pointer. 38 | static uint32_t showRGBInternal(PixelController pixels) { 39 | struct M0ClocklessData data; 40 | data.d[0] = pixels.d[0]; 41 | data.d[1] = pixels.d[1]; 42 | data.d[2] = pixels.d[2]; 43 | data.s[0] = pixels.mScale[0]; 44 | data.s[1] = pixels.mScale[1]; 45 | data.s[2] = pixels.mScale[2]; 46 | data.e[0] = pixels.e[0]; 47 | data.e[1] = pixels.e[1]; 48 | data.e[2] = pixels.e[2]; 49 | data.adj = pixels.mAdvance; 50 | 51 | typename FastPin::port_ptr_t portBase = FastPin::port(); 52 | return showLedData<8,4,T1,T2,T3,RGB_ORDER, WAIT_TIME>(portBase, FastPin::mask(), pixels.mData, pixels.mLen, &data); 53 | } 54 | 55 | 56 | }; 57 | 58 | FASTLED_NAMESPACE_END 59 | 60 | 61 | #endif // __INC_CLOCKLESS_ARM_D21 62 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/setCursor/setCursor.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - setCursor 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch prints to all the positions of the LCD using the 10 | setCursor() method: 11 | 12 | The circuit: 13 | * LCD RS pin to digital pin 12 14 | * LCD Enable pin to digital pin 11 15 | * LCD D4 pin to digital pin 5 16 | * LCD D5 pin to digital pin 4 17 | * LCD D6 pin to digital pin 3 18 | * LCD D7 pin to digital pin 2 19 | * LCD R/W pin to ground 20 | * 10K resistor: 21 | * ends to +5V and ground 22 | * wiper to LCD VO pin (pin 3) 23 | 24 | Library originally added 18 Apr 2008 25 | by David A. Mellis 26 | library modified 5 Jul 2009 27 | by Limor Fried (http://www.ladyada.net) 28 | example added 9 Jul 2009 29 | by Tom Igoe 30 | modified 22 Nov 2010 31 | by Tom Igoe 32 | 33 | This example code is in the public domain. 34 | 35 | http://www.arduino.cc/en/Tutorial/LiquidCrystalSetCursor 36 | 37 | */ 38 | 39 | // include the library code: 40 | #include 41 | 42 | // these constants won't change. But you can change the size of 43 | // your LCD using them: 44 | const int numRows = 2; 45 | const int numCols = 16; 46 | 47 | // initialize the library with the numbers of the interface pins 48 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 49 | 50 | void setup() { 51 | // set up the LCD's number of columns and rows: 52 | lcd.begin(numCols, numRows); 53 | } 54 | 55 | void loop() { 56 | // loop from ASCII 'a' to ASCII 'z': 57 | for (int thisLetter = 'a'; thisLetter <= 'z'; thisLetter++) { 58 | // loop over the columns: 59 | for (int thisRow = 0; thisRow < numRows; thisRow++) { 60 | // loop over the rows: 61 | for (int thisCol = 0; thisCol < numCols; thisCol++) { 62 | // set the cursor position: 63 | lcd.setCursor(thisCol, thisRow); 64 | // print the letter: 65 | lcd.write(thisLetter); 66 | delay(200); 67 | } 68 | } 69 | } 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/TextDirection/TextDirection.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - TextDirection 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch demonstrates how to use leftToRight() and rightToLeft() 10 | to move the cursor. 11 | 12 | The circuit: 13 | * LCD RS pin to digital pin 12 14 | * LCD Enable pin to digital pin 11 15 | * LCD D4 pin to digital pin 5 16 | * LCD D5 pin to digital pin 4 17 | * LCD D6 pin to digital pin 3 18 | * LCD D7 pin to digital pin 2 19 | * LCD R/W pin to ground 20 | * 10K resistor: 21 | * ends to +5V and ground 22 | * wiper to LCD VO pin (pin 3) 23 | 24 | Library originally added 18 Apr 2008 25 | by David A. Mellis 26 | library modified 5 Jul 2009 27 | by Limor Fried (http://www.ladyada.net) 28 | example added 9 Jul 2009 29 | by Tom Igoe 30 | modified 22 Nov 2010 31 | by Tom Igoe 32 | 33 | This example code is in the public domain. 34 | 35 | http://www.arduino.cc/en/Tutorial/LiquidCrystalTextDirection 36 | 37 | */ 38 | 39 | // include the library code: 40 | #include 41 | 42 | // initialize the library with the numbers of the interface pins 43 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 44 | 45 | int thisChar = 'a'; 46 | 47 | void setup() { 48 | // set up the LCD's number of columns and rows: 49 | lcd.begin(16, 2); 50 | // turn on the cursor: 51 | lcd.cursor(); 52 | } 53 | 54 | void loop() { 55 | // reverse directions at 'm': 56 | if (thisChar == 'm') { 57 | // go right for the next letter 58 | lcd.rightToLeft(); 59 | } 60 | // reverse again at 's': 61 | if (thisChar == 's') { 62 | // go left for the next letter 63 | lcd.leftToRight(); 64 | } 65 | // reset at 'z': 66 | if (thisChar > 'z') { 67 | // go to (0,0): 68 | lcd.home(); 69 | // start again at 0 70 | thisChar = 'a'; 71 | } 72 | // print the character 73 | lcd.write(thisChar); 74 | // wait a second: 75 | delay(1000); 76 | // increment the letter: 77 | thisChar++; 78 | } 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Libraries/FHT/examples/fht_codec/fht_codec.pde: -------------------------------------------------------------------------------- 1 | /* 2 | fht_codec.pde 3 | guest openmusiclabs.com 9.5.12 4 | example sketch for running an fht on data collected 5 | with the codecshield. this will send out 128 bins of 6 | data over the serial port at 115.2kb. there is a 7 | pure data patch for visualizing the data. 8 | 9 | note: be sure to download the latest AudioCodec library 10 | if yours is older than 8.16.12. there were modifications 11 | made that allow for code outside of the interrupt. 12 | */ 13 | 14 | #define SAMPLE_RATE 44 // 44.1Khz 15 | #define ADCS 0 // no ADCs are being used 16 | #define LOG_OUT 1 // use the log output function 17 | #define FHT_N 256 // set to 256 point fht 18 | 19 | // include necessary libraries 20 | #include "FHT.h" 21 | #include 22 | #include 23 | #include 24 | 25 | // create data variables for audio transfer 26 | int left_in = 0x0000; 27 | int left_out = 0x0000; 28 | int right_in = 0x0000; 29 | int right_out = 0x0000; 30 | unsigned int count = 0; 31 | volatile byte flag = 1; 32 | 33 | void setup() { 34 | Serial.begin(115200); // use serial port 35 | AudioCodec_init(); 36 | } 37 | 38 | void loop() { 39 | while(1) { // reduces clock jitter 40 | while(flag); // wait for samples to be collected 41 | fht_window(); // window the data 42 | fht_reorder(); // reorder for fht input 43 | fht_run(); // process fht 44 | fht_mag_log(); // take output of fht 45 | Serial.write(255); // send out a start byte 46 | Serial.write(fht_log_out, FHT_N/2); // send out data bytes 47 | flag = 1; // tell the codec that processing is done 48 | } 49 | } 50 | 51 | // timer1 interrupt routine - data collected here 52 | ISR(TIMER1_COMPA_vect) { // store registers (NAKED removed) 53 | 54 | // &'s are necessary on data_in variables 55 | AudioCodec_data(&left_in, &right_in, left_out, right_out); 56 | left_out = left_in; // pass audio through 57 | right_out = right_in; 58 | if (flag) { // check if the fht is ready for more data 59 | fht_input[count] = left_in; // put real data into bins 60 | count++; // increment to next bin 61 | if (count >= FHT_N) { // check if all bins are full 62 | flag = 0; // tell the fht to start running 63 | count = 0; // reset the bin counter 64 | } 65 | } 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/NoisePlayground/NoisePlayground.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define kMatrixWidth 16 4 | #define kMatrixHeight 16 5 | 6 | #define NUM_LEDS (kMatrixWidth * kMatrixHeight) 7 | // Param for different pixel layouts 8 | #define kMatrixSerpentineLayout true 9 | 10 | // led array 11 | CRGB leds[kMatrixWidth * kMatrixHeight]; 12 | 13 | // x,y, & time values 14 | uint32_t x,y,v_time,hue_time,hxy; 15 | 16 | // Play with the values of the variables below and see what kinds of effects they 17 | // have! More octaves will make things slower. 18 | 19 | // how many octaves to use for the brightness and hue functions 20 | uint8_t octaves=1; 21 | uint8_t hue_octaves=3; 22 | 23 | // the 'distance' between points on the x and y axis 24 | int xscale=57771; 25 | int yscale=57771; 26 | 27 | // the 'distance' between x/y points for the hue noise 28 | int hue_scale=1; 29 | 30 | // how fast we move through time & hue noise 31 | int time_speed=1111; 32 | int hue_speed=31; 33 | 34 | // adjust these values to move along the x or y axis between frames 35 | int x_speed=331; 36 | int y_speed=1111; 37 | 38 | void loop() { 39 | // fill the led array 2/16-bit noise values 40 | fill_2dnoise16(LEDS.leds(), kMatrixWidth, kMatrixHeight, kMatrixSerpentineLayout, 41 | octaves,x,xscale,y,yscale,v_time, 42 | hue_octaves,hxy,hue_scale,hxy,hue_scale,hue_time, false); 43 | 44 | LEDS.show(); 45 | 46 | // adjust the intra-frame time values 47 | x += x_speed; 48 | y += y_speed; 49 | v_time += time_speed; 50 | hue_time += hue_speed; 51 | // delay(50); 52 | } 53 | 54 | 55 | void setup() { 56 | // initialize the x/y and time values 57 | random16_set_seed(8934); 58 | random16_add_entropy(analogRead(3)); 59 | 60 | Serial.begin(57600); 61 | Serial.println("resetting!"); 62 | 63 | delay(3000); 64 | LEDS.addLeds(leds,NUM_LEDS); 65 | LEDS.setBrightness(96); 66 | 67 | hxy = (uint32_t)((uint32_t)random16() << 16) + (uint32_t)random16(); 68 | x = (uint32_t)((uint32_t)random16() << 16) + (uint32_t)random16(); 69 | y = (uint32_t)((uint32_t)random16() << 16) + (uint32_t)random16(); 70 | v_time = (uint32_t)((uint32_t)random16() << 16) + (uint32_t)random16(); 71 | hue_time = (uint32_t)((uint32_t)random16() << 16) + (uint32_t)random16(); 72 | 73 | } 74 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/PORTING.md: -------------------------------------------------------------------------------- 1 | =New platform porting guide= 2 | 3 | == Setting up the basic files/folders == 4 | 5 | * Create platform directory (e.g. platforms/arm/kl26) 6 | * Create configuration header led_sysdefs_arm_kl26.h: 7 | * Define platform flags (like FASTLED_ARM/FASTLED_TEENSY) 8 | * Define configuration parameters re: interrupts, or clock doubling 9 | * Include extar system header files if needed 10 | * Create main platform include, fastled_arm_kl26.h 11 | * Include the various other header files as needed 12 | * Modify led_sysdefs.h to conditionally include platform sysdefs header file 13 | * Modify platforms.h to conditionally include platform fastled header 14 | 15 | == Porting fastpin.h == 16 | 17 | The heart of the FastLED library is the fast pin accesss. This is a templated class that provides 1-2 cycle pin access, bypassing digital write and other such things. As such, this will usually be the first bit of the library that you will want to port when moving to a new platform. Once you have FastPIN up and running then you can do some basic work like testing toggles or running bit-bang'd SPI output. 18 | 19 | There's two low level FastPin classes. There's the base FastPIN template class, and then there is FastPinBB which is for bit-banded access on those MCUs that support bitbanding. Note that the bitband class is optional and primarily useful in the implementation of other functionality internal to the platform. This file is also where you would do the pin to port/bit mapping defines. 20 | 21 | Explaining how the macros work and should be used is currently beyond the scope of this document. 22 | 23 | == Porting fastspi.h == 24 | 25 | This is where you define the low level interface to the hardware SPI system (including a writePixels method that does a bunch of housekeeping for writing led data). Use the fastspi_nop.h file as a reference for the methods that need to be implemented. There are ofteh other useful methods that can help with the internals of the SPI code, I recommend taking a look at how the various platforms implement their SPI classes. 26 | 27 | == Porting clockless.h == 28 | 29 | This is where you define the code for the clockless controllers. Across ARM platforms this will usually be fairly similar - though different arm platforms will have different clock sources that you can/should use. 30 | -------------------------------------------------------------------------------- /Libraries/FHT/cas_lookup_256.inc: -------------------------------------------------------------------------------- 1 | // cas_lookup_256.inc 2 | // guest openmusiclabs.com 9.4.12 3 | // lookup values for cos and sin of 2(pi)k/N 4 | // first is cos second is sin 5 | 6 | 30274,12540, 7 | 23170,23170, 8 | 12540,30274, 9 | 32138,6393, 10 | 30274,12540, 11 | 27246,18205, 12 | 23170,23170, 13 | 18205,27246, 14 | 12540,30274, 15 | 6393,32138, 16 | 32610,3212, 17 | 32138,6393, 18 | 31357,9512, 19 | 30274,12540, 20 | 28899,15447, 21 | 27246,18205, 22 | 25330,20788, 23 | 23170,23170, 24 | 20788,25330, 25 | 18205,27246, 26 | 15447,28899, 27 | 12540,30274, 28 | 9512,31357, 29 | 6393,32138, 30 | 3212,32610, 31 | 32729,1608, 32 | 32610,3212, 33 | 32413,4808, 34 | 32138,6393, 35 | 31786,7962, 36 | 31357,9512, 37 | 30853,11039, 38 | 30274,12540, 39 | 29622,14010, 40 | 28899,15447, 41 | 28106,16846, 42 | 27246,18205, 43 | 26320,19520, 44 | 25330,20788, 45 | 24279,22006, 46 | 23170,23170, 47 | 22006,24279, 48 | 20788,25330, 49 | 19520,26320, 50 | 18205,27246, 51 | 16846,28106, 52 | 15447,28899, 53 | 14010,29622, 54 | 12540,30274, 55 | 11039,30853, 56 | 9512,31357, 57 | 7962,31786, 58 | 6393,32138, 59 | 4808,32413, 60 | 3212,32610, 61 | 1608,32729, 62 | 32758,804, 63 | 32729,1608, 64 | 32679,2411, 65 | 32610,3212, 66 | 32522,4011, 67 | 32413,4808, 68 | 32286,5602, 69 | 32138,6393, 70 | 31972,7180, 71 | 31786,7962, 72 | 31581,8740, 73 | 31357,9512, 74 | 31114,10279, 75 | 30853,11039, 76 | 30572,11793, 77 | 30274,12540, 78 | 29957,13279, 79 | 29622,14010, 80 | 29269,14733, 81 | 28899,15447, 82 | 28511,16151, 83 | 28106,16846, 84 | 27684,17531, 85 | 27246,18205, 86 | 26791,18868, 87 | 26320,19520, 88 | 25833,20160, 89 | 25330,20788, 90 | 24812,21403, 91 | 24279,22006, 92 | 23732,22595, 93 | 23170,23170, 94 | 22595,23732, 95 | 22006,24279, 96 | 21403,24812, 97 | 20788,25330, 98 | 20160,25833, 99 | 19520,26320, 100 | 18868,26791, 101 | 18205,27246, 102 | 17531,27684, 103 | 16846,28106, 104 | 16151,28511, 105 | 15447,28899, 106 | 14733,29269, 107 | 14010,29622, 108 | 13279,29957, 109 | 12540,30274, 110 | 11793,30572, 111 | 11039,30853, 112 | 10279,31114, 113 | 9512,31357, 114 | 8740,31581, 115 | 7962,31786, 116 | 7180,31972, 117 | 6393,32138, 118 | 5602,32286, 119 | 4808,32413, 120 | 4011,32522, 121 | 3212,32610, 122 | 2411,32679, 123 | 1608,32729, 124 | 804,32758, 125 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/kl26/clockless_arm_kl26.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_CLOCKLESS_ARM_KL26 2 | #define __INC_CLOCKLESS_ARM_KL26 3 | 4 | #include "platforms/arm/common/m0clockless.h" 5 | FASTLED_NAMESPACE_BEGIN 6 | #define FASTLED_HAS_CLOCKLESS 1 7 | 8 | template 9 | class ClocklessController : public CPixelLEDController { 10 | typedef typename FastPinBB::port_ptr_t data_ptr_t; 11 | typedef typename FastPinBB::port_t data_t; 12 | 13 | data_t mPinMask; 14 | data_ptr_t mPort; 15 | CMinWait mWait; 16 | public: 17 | virtual void init() { 18 | FastPinBB::setOutput(); 19 | mPinMask = FastPinBB::mask(); 20 | mPort = FastPinBB::port(); 21 | } 22 | 23 | virtual uint16_t getMaxRefreshRate() const { return 400; } 24 | 25 | virtual void showPixels(PixelController & pixels) { 26 | mWait.wait(); 27 | cli(); 28 | uint32_t clocks = showRGBInternal(pixels); 29 | if(!clocks) { 30 | sei(); delayMicroseconds(WAIT_TIME); cli(); 31 | clocks = showRGBInternal(pixels); 32 | } 33 | long microsTaken = CLKS_TO_MICROS(clocks * ((T1 + T2 + T3) * 24)); 34 | MS_COUNTER += (microsTaken / 1000); 35 | sei(); 36 | mWait.mark(); 37 | } 38 | 39 | // This method is made static to force making register Y available to use for data on AVR - if the method is non-static, then 40 | // gcc will use register Y for the this pointer. 41 | static uint32_t showRGBInternal(PixelController pixels) { 42 | struct M0ClocklessData data; 43 | data.d[0] = pixels.d[0]; 44 | data.d[1] = pixels.d[1]; 45 | data.d[2] = pixels.d[2]; 46 | data.s[0] = pixels.mScale[0]; 47 | data.s[1] = pixels.mScale[1]; 48 | data.s[2] = pixels.mScale[2]; 49 | data.e[0] = pixels.e[0]; 50 | data.e[1] = pixels.e[1]; 51 | data.e[2] = pixels.e[2]; 52 | data.adj = pixels.mAdvance; 53 | 54 | typename FastPin::port_ptr_t portBase = FastPin::port(); 55 | return showLedData<4,8,T1,T2,T3,RGB_ORDER, WAIT_TIME>(portBase, FastPin::mask(), pixels.mData, pixels.mLen, &data); 56 | // return 0; // 0x00FFFFFF - _VAL; 57 | } 58 | 59 | 60 | }; 61 | 62 | FASTLED_NAMESPACE_END 63 | 64 | 65 | #endif // __INC_CLOCKLESS_ARM_KL26 66 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/README.md: -------------------------------------------------------------------------------- 1 | Max72xxPanel 2 | ============ 3 | 4 | An Arduino library for controlling a canvas of sets of 8x8 LEDs driven by MAX7219 or MAX7221 controllers. [Kits][hardware] sold for below 10 USD. 5 | 6 | This is a plugin for Adafruit's core graphics library GFX, providing basic graphics primitives (points, lines, circles, characters, etc.). So besides this library, you need to download and install [Adafruit_GFX][gfx-download], *dated Jul 5th, 2013 or more recent*. 7 | 8 | Written by Mark Ruys, , 2013. 9 | 10 | 11 | Installation 12 | ------------ 13 | 14 | Place the [Max72xxPanel][download] and [Adafruit_GFX][gfx-download] library folders in your `/libraries/` folder. You may need to create the `libraries` subfolder if its your first library. Restart the Arduino IDE. 15 | 16 | 17 | Features 18 | -------- 19 | - Double buffering to prevent screen flicker. Check out our example for usage. 20 | - Support for multiple matrix displays, positioned in an arbitrary rectangular layout. You can define both the order as the rotation of each display. 21 | - Uses the [SPI library][spi] to address the display(s) connected in cascade. 22 | - Low memory footprint. 23 | - Fast, no use of NOOP's. 24 | 25 | Usage 26 | ----- 27 | 28 | Read [overview][gfx-docs] for instructions how to use Adafruit_GFX. Check out our [examples][examples] to get some inspiration. Note that to update your displays, you need to explicitely call write(). 29 | 30 | At YouTube, you'll find a [ticker tape][tickertape] and [snake] demo. 31 | 32 | 33 | [download]: https://github.com/markruys/arduino-Max72xxPanel/archive/master.zip "Download Max72xxPanel library" 34 | [gfx-download]: https://github.com/adafruit/Adafruit-GFX-Library "Download Adafruit GFX Graphics Library" 35 | [gfx-docs]: http://learn.adafruit.com/adafruit-gfx-graphics-library/overview "Documentation Adafruit GFX Graphics Library" 36 | [examples]: https://github.com/markruys/arduino-Max72xxPanel/tree/master/examples "Show Max72xxPanel examples" 37 | [hardware]: https://www.google.com/search?q=MAX7219+Red+Dot+Matrix+Module "For kits, google MAX7219 Red Dot Matrix Module" 38 | [spi]: http://arduino.cc/en/Reference/SPI "SPI library" 39 | [tickertape]: http://www.youtube.com/watch?v=a8T7ZFeaf1A "Max72xxPanel Arduino library demo (ticker tape)" 40 | [snake]: http://www.youtube.com/watch?v=FbJJyuCwohs "Max72xxPanel Arduino library demo (snake)" -------------------------------------------------------------------------------- /Libraries/FHT/decibel.inc: -------------------------------------------------------------------------------- 1 | 0, 2 | 0, 3 | 8, 4 | 13, 5 | 16, 6 | 19, 7 | 21, 8 | 22, 9 | 24, 10 | 25, 11 | 27, 12 | 28, 13 | 29, 14 | 30, 15 | 30, 16 | 31, 17 | 32, 18 | 33, 19 | 33, 20 | 34, 21 | 35, 22 | 35, 23 | 36, 24 | 36, 25 | 37, 26 | 37, 27 | 38, 28 | 38, 29 | 38, 30 | 39, 31 | 39, 32 | 40, 33 | 40, 34 | 40, 35 | 41, 36 | 41, 37 | 41, 38 | 42, 39 | 42, 40 | 42, 41 | 43, 42 | 43, 43 | 43, 44 | 43, 45 | 44, 46 | 44, 47 | 44, 48 | 44, 49 | 45, 50 | 45, 51 | 45, 52 | 45, 53 | 46, 54 | 46, 55 | 46, 56 | 46, 57 | 46, 58 | 47, 59 | 47, 60 | 47, 61 | 47, 62 | 47, 63 | 48, 64 | 48, 65 | 48, 66 | 48, 67 | 48, 68 | 49, 69 | 49, 70 | 49, 71 | 49, 72 | 49, 73 | 49, 74 | 50, 75 | 50, 76 | 50, 77 | 50, 78 | 50, 79 | 50, 80 | 50, 81 | 51, 82 | 51, 83 | 51, 84 | 51, 85 | 51, 86 | 51, 87 | 51, 88 | 52, 89 | 52, 90 | 52, 91 | 52, 92 | 52, 93 | 52, 94 | 52, 95 | 52, 96 | 53, 97 | 53, 98 | 53, 99 | 53, 100 | 53, 101 | 53, 102 | 53, 103 | 53, 104 | 53, 105 | 54, 106 | 54, 107 | 54, 108 | 54, 109 | 54, 110 | 54, 111 | 54, 112 | 54, 113 | 54, 114 | 55, 115 | 55, 116 | 55, 117 | 55, 118 | 55, 119 | 55, 120 | 55, 121 | 55, 122 | 55, 123 | 55, 124 | 56, 125 | 56, 126 | 56, 127 | 56, 128 | 56, 129 | 56, 130 | 56, 131 | 56, 132 | 56, 133 | 56, 134 | 56, 135 | 57, 136 | 57, 137 | 57, 138 | 57, 139 | 57, 140 | 57, 141 | 57, 142 | 57, 143 | 57, 144 | 57, 145 | 57, 146 | 57, 147 | 58, 148 | 58, 149 | 58, 150 | 58, 151 | 58, 152 | 58, 153 | 58, 154 | 58, 155 | 58, 156 | 58, 157 | 58, 158 | 58, 159 | 58, 160 | 59, 161 | 59, 162 | 59, 163 | 59, 164 | 59, 165 | 59, 166 | 59, 167 | 59, 168 | 59, 169 | 59, 170 | 59, 171 | 59, 172 | 59, 173 | 59, 174 | 59, 175 | 60, 176 | 60, 177 | 60, 178 | 60, 179 | 60, 180 | 60, 181 | 60, 182 | 60, 183 | 60, 184 | 60, 185 | 60, 186 | 60, 187 | 60, 188 | 60, 189 | 60, 190 | 60, 191 | 61, 192 | 61, 193 | 61, 194 | 61, 195 | 61, 196 | 61, 197 | 61, 198 | 61, 199 | 61, 200 | 61, 201 | 61, 202 | 61, 203 | 61, 204 | 61, 205 | 61, 206 | 61, 207 | 61, 208 | 62, 209 | 62, 210 | 62, 211 | 62, 212 | 62, 213 | 62, 214 | 62, 215 | 62, 216 | 62, 217 | 62, 218 | 62, 219 | 62, 220 | 62, 221 | 62, 222 | 62, 223 | 62, 224 | 62, 225 | 62, 226 | 63, 227 | 63, 228 | 63, 229 | 63, 230 | 63, 231 | 63, 232 | 63, 233 | 63, 234 | 63, 235 | 63, 236 | 63, 237 | 63, 238 | 63, 239 | 63, 240 | 63, 241 | 63, 242 | 63, 243 | 63, 244 | 63, 245 | 63, 246 | 63, 247 | 64, 248 | 64, 249 | 64, 250 | 64, 251 | 64, 252 | 64, 253 | 64, 254 | 64, 255 | 64, 256 | 64, 257 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Blink/Blink.ino: -------------------------------------------------------------------------------- 1 | #include "FastLED.h" 2 | 3 | // How many leds in your strip? 4 | #define NUM_LEDS 1 5 | 6 | // For led chips like Neopixels, which have a data line, ground, and power, you just 7 | // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, 8 | // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN 9 | #define DATA_PIN 3 10 | #define CLOCK_PIN 13 11 | 12 | // Define the array of leds 13 | CRGB leds[NUM_LEDS]; 14 | 15 | void setup() { 16 | // Uncomment/edit one of the following lines for your leds arrangement. 17 | // FastLED.addLeds(leds, NUM_LEDS); 18 | // FastLED.addLeds(leds, NUM_LEDS); 19 | // FastLED.addLeds(leds, NUM_LEDS); 20 | // FastLED.addLeds(leds, NUM_LEDS); 21 | // FastLED.addLeds(leds, NUM_LEDS); 22 | // FastLED.addLeds(leds, NUM_LEDS); 23 | FastLED.addLeds(leds, NUM_LEDS); 24 | // FastLED.addLeds(leds, NUM_LEDS); 25 | // FastLED.addLeds(leds, NUM_LEDS); 26 | // FastLED.addLeds(leds, NUM_LEDS); 27 | // FastLED.addLeds(leds, NUM_LEDS); 28 | // FastLED.addLeds(leds, NUM_LEDS); 29 | 30 | // FastLED.addLeds(leds, NUM_LEDS); 31 | // FastLED.addLeds(leds, NUM_LEDS); 32 | // FastLED.addLeds(leds, NUM_LEDS); 33 | // FastLED.addLeds(leds, NUM_LEDS); 34 | // FastLED.addLeds(leds, NUM_LEDS); 35 | // FastLED.addLeds(leds, NUM_LEDS); 36 | 37 | // FastLED.addLeds(leds, NUM_LEDS); 38 | // FastLED.addLeds(leds, NUM_LEDS); 39 | // FastLED.addLeds(leds, NUM_LEDS); 40 | // FastLED.addLeds(leds, NUM_LEDS); 41 | // FastLED.addLeds(leds, NUM_LEDS); 42 | // FastLED.addLeds(leds, NUM_LEDS); 43 | } 44 | 45 | void loop() { 46 | // Turn the LED on, then pause 47 | leds[0] = CRGB::Red; 48 | FastLED.show(); 49 | delay(500); 50 | // Now turn the LED off, then pause 51 | leds[0] = CRGB::Black; 52 | FastLED.show(); 53 | delay(500); 54 | } 55 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/Scroll/Scroll.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - scrollDisplayLeft() and scrollDisplayRight() 3 | 4 | Demonstrates the use a 16x2 LCD display. The LiquidCrystal 5 | library works with all LCD displays that are compatible with the 6 | Hitachi HD44780 driver. There are many of them out there, and you 7 | can usually tell them by the 16-pin interface. 8 | 9 | This sketch prints "Hello World!" to the LCD and uses the 10 | scrollDisplayLeft() and scrollDisplayRight() methods to scroll 11 | the text. 12 | 13 | The circuit: 14 | * LCD RS pin to digital pin 12 15 | * LCD Enable pin to digital pin 11 16 | * LCD D4 pin to digital pin 5 17 | * LCD D5 pin to digital pin 4 18 | * LCD D6 pin to digital pin 3 19 | * LCD D7 pin to digital pin 2 20 | * LCD R/W pin to ground 21 | * 10K resistor: 22 | * ends to +5V and ground 23 | * wiper to LCD VO pin (pin 3) 24 | 25 | Library originally added 18 Apr 2008 26 | by David A. Mellis 27 | library modified 5 Jul 2009 28 | by Limor Fried (http://www.ladyada.net) 29 | example added 9 Jul 2009 30 | by Tom Igoe 31 | modified 22 Nov 2010 32 | by Tom Igoe 33 | 34 | This example code is in the public domain. 35 | 36 | http://www.arduino.cc/en/Tutorial/LiquidCrystalScroll 37 | 38 | */ 39 | 40 | // include the library code: 41 | #include 42 | 43 | // initialize the library with the numbers of the interface pins 44 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 45 | 46 | void setup() { 47 | // set up the LCD's number of columns and rows: 48 | lcd.begin(16, 2); 49 | // Print a message to the LCD. 50 | lcd.print("hello, world!"); 51 | delay(1000); 52 | } 53 | 54 | void loop() { 55 | // scroll 13 positions (string length) to the left 56 | // to move it offscreen left: 57 | for (int positionCounter = 0; positionCounter < 13; positionCounter++) { 58 | // scroll one position left: 59 | lcd.scrollDisplayLeft(); 60 | // wait a bit: 61 | delay(150); 62 | } 63 | 64 | // scroll 29 positions (string length + display length) to the right 65 | // to move it offscreen right: 66 | for (int positionCounter = 0; positionCounter < 29; positionCounter++) { 67 | // scroll one position right: 68 | lcd.scrollDisplayRight(); 69 | // wait a bit: 70 | delay(150); 71 | } 72 | 73 | // scroll 16 positions (display length + string length) to the left 74 | // to move it back to center: 75 | for (int positionCounter = 0; positionCounter < 16; positionCounter++) { 76 | // scroll one position left: 77 | lcd.scrollDisplayLeft(); 78 | // wait a bit: 79 | delay(150); 80 | } 81 | 82 | // delay at the end of the full loop: 83 | delay(1000); 84 | 85 | } 86 | 87 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/fastled_progmem.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FL_PROGMEM_H 2 | #define __INC_FL_PROGMEM_H 3 | 4 | #include "FastLED.h" 5 | 6 | ///@file fastled_progmem.h 7 | /// wrapper definitions to allow seamless use of PROGMEM in environmens that have it 8 | 9 | FASTLED_NAMESPACE_BEGIN 10 | 11 | // Compatibility layer for devices that do or don't 12 | // have "PROGMEM" and the associated pgm_ accessors. 13 | // 14 | // If a platform supports PROGMEM, it should define 15 | // "FASTLED_USE_PROGMEM" as 1, otherwise FastLED will 16 | // fall back to NOT using PROGMEM. 17 | // 18 | // Whether or not pgmspace.h is #included is separately 19 | // controllable by FASTLED_INCLUDE_PGMSPACE, if needed. 20 | 21 | 22 | // If FASTLED_USE_PROGMEM is 1, we'll map FL_PROGMEM 23 | // and the FL_PGM_* accessors to the Arduino equivalents. 24 | #if FASTLED_USE_PROGMEM == 1 25 | #ifndef FASTLED_INCLUDE_PGMSPACE 26 | #define FASTLED_INCLUDE_PGMSPACE 1 27 | #endif 28 | 29 | #if FASTLED_INCLUDE_PGMSPACE == 1 30 | #include 31 | #endif 32 | 33 | #define FL_PROGMEM PROGMEM 34 | 35 | // Note: only the 'near' memory wrappers are provided. 36 | // If you're using 'far' memory, you already have 37 | // portability issues to work through, but you could 38 | // add more support here if needed. 39 | #define FL_PGM_READ_BYTE_NEAR(x) (pgm_read_byte_near(x)) 40 | #define FL_PGM_READ_WORD_NEAR(x) (pgm_read_word_near(x)) 41 | #define FL_PGM_READ_DWORD_NEAR(x) (pgm_read_dword_near(x)) 42 | 43 | // Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734 44 | #if __GNUC__ < 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ < 6)) 45 | #ifdef FASTLED_AVR 46 | #ifdef PROGMEM 47 | #undef PROGMEM 48 | #define PROGMEM __attribute__((section(".progmem.data"))) 49 | #endif 50 | #endif 51 | #endif 52 | 53 | #else 54 | // If FASTLED_USE_PROGMEM is 0 or undefined, 55 | // we'll use regular memory (RAM) access. 56 | 57 | //empty PROGMEM simulation 58 | #define FL_PROGMEM 59 | #define FL_PGM_READ_BYTE_NEAR(x) (*((const uint8_t*)(x))) 60 | #define FL_PGM_READ_WORD_NEAR(x) (*((const uint16_t*)(x))) 61 | #define FL_PGM_READ_DWORD_NEAR(x) (*((const uint32_t*)(x))) 62 | 63 | #endif 64 | 65 | 66 | // On some platforms, most notably ARM M0, unaligned access 67 | // to 'PROGMEM' for multibyte values (eg read dword) is 68 | // not allowed and causes a crash. This macro can help 69 | // force 4-byte alignment as needed. The FastLED gradient 70 | // palette code uses 'read dword', and now uses this macro 71 | // to make sure that gradient palettes are 4-byte aligned. 72 | #ifdef FASTLED_ARM 73 | #define FL_ALIGN_PROGMEM __attribute__ ((aligned (4))) 74 | #else 75 | #define FL_ALIGN_PROGMEM 76 | #endif 77 | 78 | 79 | FASTLED_NAMESPACE_END 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/fastspi_nop.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTSPI_NOP_H 2 | #define __INC_FASTSPI_NOP_H 3 | 4 | #if 0 // Guard against the arduino ide idiotically including every header file 5 | 6 | #include "FastLED.h" 7 | 8 | FASTLED_NAMESPACE_BEGIN 9 | 10 | /// A nop/stub class, mostly to show the SPI methods that are needed/used by the various SPI chipset implementations. Should 11 | /// be used as a definition for the set of methods that the spi implementation classes should use (since C++ doesn't support the 12 | /// idea of interfaces - it's possible this could be done with virtual classes, need to decide if i want that overhead) 13 | template 14 | class NOPSPIOutput { 15 | Selectable *m_pSelect; 16 | 17 | public: 18 | NOPSPIOutput() { m_pSelect = NULL; } 19 | NOPSPIOutput(Selectable *pSelect) { m_pSelect = pSelect; } 20 | 21 | /// set the object representing the selectable 22 | void setSelect(Selectable *pSelect) { m_pSelect = pSelect; } 23 | 24 | /// initialize the SPI subssytem 25 | void init() { /* TODO */ } 26 | 27 | /// latch the CS select 28 | void select() { /* TODO */ } 29 | 30 | /// release the CS select 31 | void release() { /* TODO */ } 32 | 33 | /// wait until all queued up data has been written 34 | void waitFully(); 35 | 36 | /// not the most efficient mechanism in the world - but should be enough for sm16716 and friends 37 | template inline static void writeBit(uint8_t b) { /* TODO */ } 38 | 39 | /// write a byte out via SPI (returns immediately on writing register) 40 | void writeByte(uint8_t b) { /* TODO */ } 41 | /// write a word out via SPI (returns immediately on writing register) 42 | void writeWord(uint16_t w) { /* TODO */ } 43 | 44 | /// A raw set of writing byte values, assumes setup/init/waiting done elsewhere (static for use by adjustment classes) 45 | static void writeBytesValueRaw(uint8_t value, int len) { /* TODO */ } 46 | 47 | /// A full cycle of writing a value for len bytes, including select, release, and waiting 48 | void writeBytesValue(uint8_t value, int len) { /* TODO */ } 49 | 50 | /// A full cycle of writing a raw block of data out, including select, release, and waiting 51 | void writeBytes(uint8_t *data, int len) { /* TODO */ } 52 | 53 | /// write a single bit out, which bit from the passed in byte is determined by template parameter 54 | template inline static void writeBit(uint8_t b) { /* TODO */ } 55 | 56 | /// write out pixel data from the given PixelController object 57 | template void writePixels(PixelController pixels) { /* TODO */ } 58 | 59 | }; 60 | 61 | FASTLED_NAMESPACE_END 62 | 63 | #endif 64 | #endif 65 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Img2Code/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/lib8tion/random8.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_LIB8TION_RANDOM_H 2 | #define __INC_LIB8TION_RANDOM_H 3 | ///@ingroup lib8tion 4 | 5 | ///@defgroup Random Fast random number generators 6 | /// Fast 8- and 16- bit unsigned random numbers. 7 | /// Significantly faster than Arduino random(), but 8 | /// also somewhat less random. You can add entropy. 9 | ///@{ 10 | 11 | // X(n+1) = (2053 * X(n)) + 13849) 12 | #define FASTLED_RAND16_2053 ((uint16_t)(2053)) 13 | #define FASTLED_RAND16_13849 ((uint16_t)(13849)) 14 | 15 | /// random number seed 16 | extern uint16_t rand16seed;// = RAND16_SEED; 17 | 18 | /// Generate an 8-bit random number 19 | LIB8STATIC uint8_t random8() 20 | { 21 | rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849; 22 | // return the sum of the high and low bytes, for better 23 | // mixing and non-sequential correlation 24 | return (uint8_t)(((uint8_t)(rand16seed & 0xFF)) + 25 | ((uint8_t)(rand16seed >> 8))); 26 | } 27 | 28 | /// Generate a 16 bit random number 29 | LIB8STATIC uint16_t random16() 30 | { 31 | rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849; 32 | return rand16seed; 33 | } 34 | 35 | /// Generate an 8-bit random number between 0 and lim 36 | /// @param lim the upper bound for the result 37 | LIB8STATIC uint8_t random8(uint8_t lim) 38 | { 39 | uint8_t r = random8(); 40 | r = (r*lim) >> 8; 41 | return r; 42 | } 43 | 44 | /// Generate an 8-bit random number in the given range 45 | /// @param min the lower bound for the random number 46 | /// @param lim the upper bound for the random number 47 | LIB8STATIC uint8_t random8(uint8_t min, uint8_t lim) 48 | { 49 | uint8_t delta = lim - min; 50 | uint8_t r = random8(delta) + min; 51 | return r; 52 | } 53 | 54 | /// Generate an 16-bit random number between 0 and lim 55 | /// @param lim the upper bound for the result 56 | LIB8STATIC uint16_t random16( uint16_t lim) 57 | { 58 | uint16_t r = random16(); 59 | uint32_t p = (uint32_t)lim * (uint32_t)r; 60 | r = p >> 16; 61 | return r; 62 | } 63 | 64 | /// Generate an 16-bit random number in the given range 65 | /// @param min the lower bound for the random number 66 | /// @param lim the upper bound for the random number 67 | LIB8STATIC uint16_t random16( uint16_t min, uint16_t lim) 68 | { 69 | uint16_t delta = lim - min; 70 | uint16_t r = random16( delta) + min; 71 | return r; 72 | } 73 | 74 | /// Set the 16-bit seed used for the random number generator 75 | LIB8STATIC void random16_set_seed( uint16_t seed) 76 | { 77 | rand16seed = seed; 78 | } 79 | 80 | /// Get the current seed value for the random number generator 81 | LIB8STATIC uint16_t random16_get_seed() 82 | { 83 | return rand16seed; 84 | } 85 | 86 | /// Add entropy into the random number generator 87 | LIB8STATIC void random16_add_entropy( uint16_t entropy) 88 | { 89 | rand16seed += entropy; 90 | } 91 | 92 | ///@} 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/color.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_COLOR_H 2 | #define __INC_COLOR_H 3 | 4 | #include "FastLED.h" 5 | 6 | FASTLED_NAMESPACE_BEGIN 7 | 8 | ///@file color.h 9 | /// contains definitions for color correction and temperature 10 | ///@defgroup ColorEnums Color correction/temperature 11 | /// definitions for color correction and light temperatures 12 | ///@{ 13 | typedef enum { 14 | // Color correction starting points 15 | 16 | /// typical values for SMD5050 LEDs 17 | ///@{ 18 | TypicalSMD5050=0xFFB0F0 /* 255, 176, 240 */, 19 | TypicalLEDStrip=0xFFB0F0 /* 255, 176, 240 */, 20 | ///@} 21 | 22 | /// typical values for 8mm "pixels on a string" 23 | /// also for many through-hole 'T' package LEDs 24 | ///@{ 25 | Typical8mmPixel=0xFFE08C /* 255, 224, 140 */, 26 | TypicalPixelString=0xFFE08C /* 255, 224, 140 */, 27 | ///@} 28 | 29 | /// uncorrected color 30 | UncorrectedColor=0xFFFFFF 31 | 32 | } LEDColorCorrection; 33 | 34 | 35 | typedef enum { 36 | /// @name Black-body radiation light sources 37 | /// Black-body radiation light sources emit a (relatively) continuous 38 | /// spectrum, and can be described as having a Kelvin 'temperature' 39 | ///@{ 40 | /// 1900 Kelvin 41 | Candle=0xFF9329 /* 1900 K, 255, 147, 41 */, 42 | /// 2600 Kelvin 43 | Tungsten40W=0xFFC58F /* 2600 K, 255, 197, 143 */, 44 | /// 2850 Kelvin 45 | Tungsten100W=0xFFD6AA /* 2850 K, 255, 214, 170 */, 46 | /// 3200 Kelvin 47 | Halogen=0xFFF1E0 /* 3200 K, 255, 241, 224 */, 48 | /// 5200 Kelvin 49 | CarbonArc=0xFFFAF4 /* 5200 K, 255, 250, 244 */, 50 | /// 5400 Kelvin 51 | HighNoonSun=0xFFFFFB /* 5400 K, 255, 255, 251 */, 52 | /// 6000 Kelvin 53 | DirectSunlight=0xFFFFFF /* 6000 K, 255, 255, 255 */, 54 | /// 7000 Kelvin 55 | OvercastSky=0xC9E2FF /* 7000 K, 201, 226, 255 */, 56 | /// 20000 Kelvin 57 | ClearBlueSky=0x409CFF /* 20000 K, 64, 156, 255 */, 58 | ///@} 59 | 60 | /// @name Gaseous light sources 61 | /// Gaseous light sources emit discrete spectral bands, and while we can 62 | /// approximate their aggregate hue with RGB values, they don't actually 63 | /// have a proper Kelvin temperature. 64 | ///@{ 65 | WarmFluorescent=0xFFF4E5 /* 0 K, 255, 244, 229 */, 66 | StandardFluorescent=0xF4FFFA /* 0 K, 244, 255, 250 */, 67 | CoolWhiteFluorescent=0xD4EBFF /* 0 K, 212, 235, 255 */, 68 | FullSpectrumFluorescent=0xFFF4F2 /* 0 K, 255, 244, 242 */, 69 | GrowLightFluorescent=0xFFEFF7 /* 0 K, 255, 239, 247 */, 70 | BlackLightFluorescent=0xA700FF /* 0 K, 167, 0, 255 */, 71 | MercuryVapor=0xD8F7FF /* 0 K, 216, 247, 255 */, 72 | SodiumVapor=0xFFD1B2 /* 0 K, 255, 209, 178 */, 73 | MetalHalide=0xF2FCFF /* 0 K, 242, 252, 255 */, 74 | HighPressureSodium=0xFFB74C /* 0 K, 255, 183, 76 */, 75 | ///@} 76 | 77 | /// Uncorrected temperature 0xFFFFFF 78 | UncorrectedTemperature=0xFFFFFF 79 | } ColorTemperature; 80 | 81 | FASTLED_NAMESPACE_END 82 | 83 | ///@} 84 | #endif 85 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/examples/Snake/Snake.pde: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int pinCS = 10; // Attach CS to this pin, DIN to MOSI and CLK to SCK (cf http://arduino.cc/en/Reference/SPI ) 6 | int numberOfHorizontalDisplays = 1; 7 | int numberOfVerticalDisplays = 1; 8 | 9 | Max72xxPanel matrix = Max72xxPanel(pinCS, numberOfHorizontalDisplays, numberOfVerticalDisplays); 10 | 11 | const int pinRandom = A0; 12 | 13 | const int wait = 100; // In milliseconds 14 | const int length = 8; 15 | 16 | int x[length], y[length]; 17 | int ptr, nextPtr; 18 | 19 | void setup() { 20 | matrix.setIntensity(4); // Set brightness between 0 and 15 21 | 22 | // Adjust to your own needs 23 | // matrix.setPosition(0, 0, 0); // The first display is at <0, 0> 24 | // matrix.setPosition(1, 1, 0); // The second display is at <1, 0> 25 | // matrix.setPosition(2, 2, 0); // The third display is at <2, 0> 26 | // matrix.setPosition(3, 3, 0); // And the last display is at <3, 0> 27 | // ... 28 | // matrix.setRotation(0, 2); // The first display is position upside down 29 | // matrix.setRotation(3, 2); // The same hold for the last display 30 | 31 | // Reset all variables 32 | for ( ptr = 0; ptr < length; ptr++ ) { 33 | x[ptr] = numberOfHorizontalDisplays * 8 / 2; 34 | y[ptr] = numberOfVerticalDisplays * 8 / 2; 35 | } 36 | nextPtr = 0; 37 | 38 | randomSeed(analogRead(pinRandom)); // Initialize random generator 39 | } 40 | 41 | void loop() { 42 | 43 | // Shift pointer to the next segment 44 | ptr = nextPtr; 45 | nextPtr = next(ptr); 46 | 47 | matrix.drawPixel(x[ptr], y[ptr], HIGH); // Draw the head of the snake 48 | matrix.write(); // Send bitmap to display 49 | 50 | delay(wait); 51 | 52 | if ( ! occupied(nextPtr) ) { 53 | matrix.drawPixel(x[nextPtr], y[nextPtr], LOW); // Remove the tail of the snake 54 | } 55 | 56 | for ( int attempt = 0; attempt < 10; attempt++ ) { 57 | 58 | // Jump at random one step up, down, left, or right 59 | switch ( random(4) ) { 60 | case 0: x[nextPtr] = constrain(x[ptr] + 1, 0, matrix.width() - 1); y[nextPtr] = y[ptr]; break; 61 | case 1: x[nextPtr] = constrain(x[ptr] - 1, 0, matrix.width() - 1); y[nextPtr] = y[ptr]; break; 62 | case 2: y[nextPtr] = constrain(y[ptr] + 1, 0, matrix.height() - 1); x[nextPtr] = x[ptr]; break; 63 | case 3: y[nextPtr] = constrain(y[ptr] - 1, 0, matrix.height() - 1); x[nextPtr] = x[ptr]; break; 64 | } 65 | 66 | if ( ! occupied(nextPtr) ) { 67 | break; // The spot is empty, break out the for loop 68 | } 69 | } 70 | } 71 | 72 | boolean occupied(int ptrA) { 73 | for ( int ptrB = 0 ; ptrB < length; ptrB++ ) { 74 | if ( ptrA != ptrB ) { 75 | if ( equal(ptrA, ptrB) ) { 76 | return true; 77 | } 78 | } 79 | } 80 | 81 | return false; 82 | } 83 | 84 | int next(int ptr) { 85 | return (ptr + 1) % length; 86 | } 87 | 88 | boolean equal(int ptrA, int ptrB) { 89 | return x[ptrA] == x[ptrB] && y[ptrA] == y[ptrB]; 90 | } 91 | 92 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/fastled_config.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTLED_CONFIG_H 2 | #define __INC_FASTLED_CONFIG_H 3 | 4 | #include "FastLED.h" 5 | 6 | ///@file fastled_config.h 7 | /// contains definitions that can be used to configure FastLED at compile time 8 | 9 | // Use this option only for debugging pin access and forcing software pin access. Note that 10 | // software pin access only works in Arduino based environments. Forces use of digitalWrite 11 | // methods for pin access vs. direct hardware port access 12 | // #define FASTLED_FORCE_SOFTWARE_PINS 13 | 14 | // Use this option only for debugging bitbang'd spi access or to work around bugs in hardware 15 | // spi access. Forces use of bit-banged spi, even on pins that has hardware SPI available. 16 | // #define FASTLED_FORCE_SOFTWARE_SPI 17 | 18 | // Use this to force FastLED to allow interrupts in the clockless chipsets (or to force it to 19 | // disallow), overriding the default on platforms that support this. Set the value to 1 to 20 | // allow interrupts or 0 to disallow them. 21 | // #define FASTLED_ALLOW_INTERRUPTS 1 22 | // #define FASTLED_ALLOW_INTERRUPTS 0 23 | 24 | // Use this to allow some integer overflows/underflows in the inoise functions. 25 | // The original implementions allowed this, and had some discontinuties in the noise 26 | // output. It's technically an implementation bug, and was fixed, but you may wish 27 | // to preserve the old look and feel of the inoise functions in your existing animations. 28 | // The default is 0: NO overflow, and 'continuous' noise output, aka the fixed way. 29 | // #define FASTLED_NOISE_ALLOW_AVERAGE_TO_OVERFLOW 0 30 | // #define FASTLED_NOISE_ALLOW_AVERAGE_TO_OVERFLOW 1 31 | 32 | // Use this toggle whether or not to use the 'fixed' FastLED scale8. The initial scale8 33 | // had a problem where scale8(255,255) would give you 254. This is now fixed, and that 34 | // fix is enabled by default. However, if for some reason you have code that is not 35 | // working right as a result of this (e.g. code that was expecting the old scale8 behavior) 36 | // you can disable it here. 37 | #define FASTLED_SCALE8_FIXED 1 38 | // #define FASTLED_SCALE8_FIXED 0 39 | 40 | // Use this toggle whether to use 'fixed' FastLED pixel blending, including ColorFromPalette. 41 | // The prior pixel blend functions had integer-rounding math errors that led to 42 | // small errors being inadvertently added to the low bits of blended colors, including colors 43 | // retrieved from color palettes using LINEAR_BLEND. This is now fixed, and the 44 | // fix is enabled by default. However, if for some reason you wish to run with the old 45 | // blending, including the integer rounding and color errors, you can disable the bugfix here. 46 | #define FASTLED_BLEND_FIXED 1 47 | // #define FASTLED_BLEND_FIXED 0 48 | 49 | // Use this to determine how many times FastLED will attempt to re-transmit a frame if interrupted 50 | // for too long by interrupts. 51 | #ifndef FASTLED_INTERRUPT_RETRY_COUNT 52 | #define FASTLED_INTERRUPT_RETRY_COUNT 2 53 | #endif 54 | 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/platforms/arm/nrf51/clockless_arm_nrf51.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_CLOCKLESS_ARM_NRF51 2 | #define __INC_CLOCKLESS_ARM_NRF51 3 | 4 | #if defined(NRF51) 5 | 6 | #include "nrf51_bitfields.h" 7 | #define FASTLED_HAS_CLOCKLESS 1 8 | 9 | #if (FASTLED_ALLOW_INTERRUPTS==1) 10 | #define SEI_CHK LED_TIMER->CC[0] = (WAIT_TIME * (F_CPU/1000000)); LED_TIMER->TASKS_CLEAR; LED_TIMER->EVENTS_COMPARE[0] = 0; 11 | #define CLI_CHK cli(); if(LED_TIMER->EVENTS_COMPARE[0]) { LED_TIMER->TASKS_STOP = 1; return 0; } 12 | #define INNER_SEI sei(); 13 | #else 14 | #define SEI_CHK 15 | #define CLI_CHK 16 | #define INNER_SEI delaycycles<1>(); 17 | #endif 18 | 19 | 20 | #include "platforms/arm/common/m0clockless.h" 21 | template 22 | class ClocklessController : public CPixelLEDController { 23 | typedef typename FastPinBB::port_ptr_t data_ptr_t; 24 | typedef typename FastPinBB::port_t data_t; 25 | 26 | data_t mPinMask; 27 | data_ptr_t mPort; 28 | CMinWait mWait; 29 | public: 30 | virtual void init() { 31 | FastPinBB::setOutput(); 32 | mPinMask = FastPinBB::mask(); 33 | mPort = FastPinBB::port(); 34 | } 35 | 36 | virtual uint16_t getMaxRefreshRate() const { return 400; } 37 | 38 | virtual void showPixels(PixelController & pixels) { 39 | mWait.wait(); 40 | cli(); 41 | if(!showRGBInternal(pixels)) { 42 | sei(); delayMicroseconds(WAIT_TIME); cli(); 43 | showRGBInternal(pixels); 44 | } 45 | sei(); 46 | mWait.mark(); 47 | } 48 | 49 | // This method is made static to force making register Y available to use for data on AVR - if the method is non-static, then 50 | // gcc will use register Y for the this pointer. 51 | static uint32_t showRGBInternal(PixelController pixels) { 52 | struct M0ClocklessData data; 53 | data.d[0] = pixels.d[0]; 54 | data.d[1] = pixels.d[1]; 55 | data.d[2] = pixels.d[2]; 56 | data.s[0] = pixels.mScale[0]; 57 | data.s[1] = pixels.mScale[1]; 58 | data.s[2] = pixels.mScale[2]; 59 | data.e[0] = pixels.e[0]; 60 | data.e[1] = pixels.e[1]; 61 | data.e[2] = pixels.e[2]; 62 | data.adj = pixels.mAdvance; 63 | 64 | typename FastPin::port_ptr_t portBase = FastPin::port(); 65 | 66 | // timer mode w/prescaler of 0 67 | LED_TIMER->MODE = TIMER_MODE_MODE_Timer; 68 | LED_TIMER->PRESCALER = 0; 69 | LED_TIMER->EVENTS_COMPARE[0] = 0; 70 | LED_TIMER->BITMODE = TIMER_BITMODE_BITMODE_16Bit; 71 | LED_TIMER->SHORTS = TIMER_SHORTS_COMPARE0_CLEAR_Msk; 72 | LED_TIMER->TASKS_START = 1; 73 | 74 | int ret = showLedData<4,8,T1,T2,T3,RGB_ORDER,WAIT_TIME>(portBase, FastPin::mask(), pixels.mData, pixels.mLen, &data); 75 | 76 | LED_TIMER->TASKS_STOP = 1; 77 | return ret; // 0x00FFFFFF - _VAL; 78 | } 79 | }; 80 | 81 | 82 | #endif // NRF51 83 | #endif // __INC_CLOCKLESS_ARM_NRF51 84 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/Adafruit_SPITFT.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _ADAFRUIT_SPITFT_ 3 | #define _ADAFRUIT_SPITFT_ 4 | 5 | 6 | #if ARDUINO >= 100 7 | #include "Arduino.h" 8 | #include "Print.h" 9 | #else 10 | #include "WProgram.h" 11 | #endif 12 | #include 13 | #include "Adafruit_GFX.h" 14 | 15 | 16 | #if defined(ARDUINO_STM32_FEATHER) 17 | typedef volatile uint32 RwReg; 18 | #endif 19 | #if defined(ARDUINO_FEATHER52) 20 | typedef volatile uint32_t RwReg; 21 | #endif 22 | 23 | class Adafruit_SPITFT : public Adafruit_GFX { 24 | protected: 25 | 26 | public: 27 | Adafruit_SPITFT(uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1); 28 | Adafruit_SPITFT(uint16_t w, uint16_t h, int8_t _CS, int8_t _DC, int8_t _RST = -1); 29 | 30 | virtual void begin(uint32_t freq) = 0; 31 | void initSPI(uint32_t freq); 32 | 33 | // Required Non-Transaction 34 | void drawPixel(int16_t x, int16_t y, uint16_t color); 35 | 36 | // Transaction API 37 | void startWrite(void); 38 | void endWrite(void); 39 | void writePixel(int16_t x, int16_t y, uint16_t color); 40 | void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); 41 | void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color); 42 | void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); 43 | 44 | // Transaction API not used by GFX 45 | virtual void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h) = 0; 46 | void writePixel(uint16_t color); 47 | void writePixels(uint16_t * colors, uint32_t len); 48 | void writeColor(uint16_t color, uint32_t len); 49 | void pushColor(uint16_t color); 50 | 51 | // Recommended Non-Transaction 52 | void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color); 53 | void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color); 54 | void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); 55 | 56 | using Adafruit_GFX::drawRGBBitmap; // Check base class first 57 | void drawRGBBitmap(int16_t x, int16_t y, 58 | uint16_t *pcolors, int16_t w, int16_t h); 59 | 60 | uint16_t color565(uint8_t r, uint8_t g, uint8_t b); 61 | 62 | protected: 63 | uint32_t _freq; 64 | #if defined (__AVR__) || defined(TEENSYDUINO) || defined (ESP8266) || defined (ESP32) 65 | int8_t _cs, _dc, _rst, _sclk, _mosi, _miso; 66 | #else 67 | int32_t _cs, _dc, _rst, _sclk, _mosi, _miso; 68 | #endif 69 | 70 | #ifdef USE_FAST_PINIO 71 | volatile RwReg *mosiport, *misoport, *clkport, *dcport, *csport; 72 | RwReg mosipinmask, misopinmask, clkpinmask, cspinmask, dcpinmask; 73 | #endif 74 | 75 | void writeCommand(uint8_t cmd); 76 | void spiWrite(uint8_t v); 77 | uint8_t spiRead(void); 78 | }; 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /Libraries/Adafruit-GFX-Library-master/README.md: -------------------------------------------------------------------------------- 1 | # Adafruit GFX Library 2 | 3 | This is the core graphics library for all our displays, providing a common set of graphics primitives (points, lines, circles, etc.). It needs to be paired with a hardware-specific library for each display device we carry (to handle the lower-level functions). 4 | 5 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! 6 | 7 | Written by Limor Fried/Ladyada for Adafruit Industries. 8 | BSD license, check license.txt for more information. 9 | All text above must be included in any redistribution. 10 | 11 | Recent Arduino IDE releases include the Library Manager for easy installation. Otherwise, to download, click the DOWNLOAD ZIP button, uncompress and rename the uncompressed folder Adafruit_GFX. Confirm that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h. Place the Adafruit_GFX library folder your /Libraries/ folder. You may need to create the Libraries subfolder if its your first library. Restart the IDE. 12 | 13 | # Useful Resources 14 | 15 | - Image2Code: This is a handy Java GUI utility to convert a BMP file into the array code necessary to display the image with the drawBitmap function. Check out the code at ehubin's GitHub repository: https://github.com/ehubin/Adafruit-GFX-Library/tree/master/Img2Code 16 | 17 | - drawXBitmap function: You can use the GIMP photo editor to save a .xbm file and use the array saved in the file to draw a bitmap with the drawXBitmap function. See the pull request here for more details: https://github.com/adafruit/Adafruit-GFX-Library/pull/31 18 | 19 | - 'Fonts' folder contains bitmap fonts for use with recent (1.1 and later) Adafruit_GFX. To use a font in your Arduino sketch, #include the corresponding .h file and pass address of GFXfont struct to setFont(). Pass NULL to revert to 'classic' fixed-space bitmap font. 20 | 21 | - 'fontconvert' folder contains a command-line tool for converting TTF fonts to Adafruit_GFX .h format. 22 | 23 | --- 24 | 25 | ### Roadmap 26 | 27 | The PRIME DIRECTIVE is to maintain backward compatibility with existing Arduino sketches -- many are hosted elsewhere and don't track changes here, some are in print and can never be changed! This "little" library has grown organically over time and sometimes we paint ourselves into a design corner and just have to live with it or add ungainly workarounds. 28 | 29 | Highly unlikely to merge any changes for additional or incompatible font formats (see Prime Directive above). There are already two formats and the code is quite bloaty there as it is (this also creates liabilities for tools and documentation). If you *must* have a more sophisticated font format, consider creating a fork with the features required for your project. For similar reasons, also unlikely to add any more bitmap formats, it's getting messy. 30 | 31 | Please don't reformat code for the sake of reformatting code. The resulting large "visual diff" makes it impossible to untangle actual bug fixes from merely rearranged lines. 32 | -------------------------------------------------------------------------------- /Libraries/FHT/hann_window.inc: -------------------------------------------------------------------------------- 1 | 0, 2 | 10, 3 | 40, 4 | 89, 5 | 159, 6 | 248, 7 | 357, 8 | 486, 9 | 635, 10 | 802, 11 | 990, 12 | 1196, 13 | 1422, 14 | 1667, 15 | 1930, 16 | 2213, 17 | 2514, 18 | 2833, 19 | 3170, 20 | 3526, 21 | 3899, 22 | 4290, 23 | 4698, 24 | 5123, 25 | 5565, 26 | 6023, 27 | 6497, 28 | 6988, 29 | 7494, 30 | 8016, 31 | 8552, 32 | 9103, 33 | 9669, 34 | 10249, 35 | 10842, 36 | 11449, 37 | 12068, 38 | 12700, 39 | 13345, 40 | 14001, 41 | 14668, 42 | 15347, 43 | 16036, 44 | 16735, 45 | 17444, 46 | 18162, 47 | 18889, 48 | 19625, 49 | 20368, 50 | 21119, 51 | 21877, 52 | 22642, 53 | 23413, 54 | 24190, 55 | 24971, 56 | 25758, 57 | 26549, 58 | 27343, 59 | 28141, 60 | 28942, 61 | 29745, 62 | 30549, 63 | 31355, 64 | 32162, 65 | 32970, 66 | 33777, 67 | 34584, 68 | 35389, 69 | 36193, 70 | 36995, 71 | 37794, 72 | 38591, 73 | 39383, 74 | 40172, 75 | 40956, 76 | 41735, 77 | 42509, 78 | 43277, 79 | 44039, 80 | 44793, 81 | 45541, 82 | 46280, 83 | 47011, 84 | 47734, 85 | 48448, 86 | 49152, 87 | 49846, 88 | 50530, 89 | 51203, 90 | 51865, 91 | 52515, 92 | 53153, 93 | 53779, 94 | 54392, 95 | 54992, 96 | 55579, 97 | 56152, 98 | 56710, 99 | 57254, 100 | 57783, 101 | 58297, 102 | 58795, 103 | 59278, 104 | 59744, 105 | 60194, 106 | 60628, 107 | 61044, 108 | 61444, 109 | 61826, 110 | 62190, 111 | 62537, 112 | 62865, 113 | 63175, 114 | 63467, 115 | 63740, 116 | 63994, 117 | 64229, 118 | 64445, 119 | 64642, 120 | 64820, 121 | 64978, 122 | 65117, 123 | 65236, 124 | 65335, 125 | 65414, 126 | 65474, 127 | 65514, 128 | 65534, 129 | 65534, 130 | 65514, 131 | 65474, 132 | 65414, 133 | 65335, 134 | 65236, 135 | 65117, 136 | 64978, 137 | 64820, 138 | 64642, 139 | 64445, 140 | 64229, 141 | 63994, 142 | 63740, 143 | 63467, 144 | 63175, 145 | 62865, 146 | 62537, 147 | 62190, 148 | 61826, 149 | 61444, 150 | 61044, 151 | 60628, 152 | 60194, 153 | 59744, 154 | 59278, 155 | 58795, 156 | 58297, 157 | 57783, 158 | 57254, 159 | 56710, 160 | 56152, 161 | 55579, 162 | 54992, 163 | 54392, 164 | 53779, 165 | 53153, 166 | 52515, 167 | 51865, 168 | 51203, 169 | 50530, 170 | 49846, 171 | 49152, 172 | 48448, 173 | 47734, 174 | 47011, 175 | 46280, 176 | 45541, 177 | 44793, 178 | 44039, 179 | 43277, 180 | 42509, 181 | 41735, 182 | 40956, 183 | 40172, 184 | 39383, 185 | 38591, 186 | 37794, 187 | 36995, 188 | 36193, 189 | 35389, 190 | 34584, 191 | 33777, 192 | 32970, 193 | 32162, 194 | 31355, 195 | 30549, 196 | 29745, 197 | 28942, 198 | 28141, 199 | 27343, 200 | 26549, 201 | 25758, 202 | 24971, 203 | 24190, 204 | 23413, 205 | 22642, 206 | 21877, 207 | 21119, 208 | 20368, 209 | 19625, 210 | 18889, 211 | 18162, 212 | 17444, 213 | 16735, 214 | 16036, 215 | 15347, 216 | 14668, 217 | 14001, 218 | 13345, 219 | 12700, 220 | 12068, 221 | 11449, 222 | 10842, 223 | 10249, 224 | 9669, 225 | 9103, 226 | 8552, 227 | 8016, 228 | 7494, 229 | 6988, 230 | 6497, 231 | 6023, 232 | 5565, 233 | 5123, 234 | 4698, 235 | 4290, 236 | 3899, 237 | 3526, 238 | 3170, 239 | 2833, 240 | 2514, 241 | 2213, 242 | 1930, 243 | 1667, 244 | 1422, 245 | 1196, 246 | 990, 247 | 802, 248 | 635, 249 | 486, 250 | 357, 251 | 248, 252 | 159, 253 | 89, 254 | 40, 255 | 10, 256 | 0, 257 | -------------------------------------------------------------------------------- /Libraries/FHT/hann_256.inc: -------------------------------------------------------------------------------- 1 | // hann_256.inc 2 | // guest openmusiclabs.com 8.16.12 3 | // lookup values for a hann window 4 | // signed 16b format 5 | 6 | 0, 7 | 5, 8 | 20, 9 | 45, 10 | 80, 11 | 124, 12 | 179, 13 | 243, 14 | 317, 15 | 401, 16 | 495, 17 | 598, 18 | 711, 19 | 833, 20 | 965, 21 | 1106, 22 | 1257, 23 | 1416, 24 | 1585, 25 | 1763, 26 | 1949, 27 | 2145, 28 | 2349, 29 | 2561, 30 | 2782, 31 | 3011, 32 | 3249, 33 | 3494, 34 | 3747, 35 | 4008, 36 | 4276, 37 | 4552, 38 | 4834, 39 | 5124, 40 | 5421, 41 | 5724, 42 | 6034, 43 | 6350, 44 | 6672, 45 | 7000, 46 | 7334, 47 | 7673, 48 | 8018, 49 | 8367, 50 | 8722, 51 | 9081, 52 | 9445, 53 | 9812, 54 | 10184, 55 | 10560, 56 | 10939, 57 | 11321, 58 | 11707, 59 | 12095, 60 | 12486, 61 | 12879, 62 | 13274, 63 | 13672, 64 | 14070, 65 | 14471, 66 | 14872, 67 | 15275, 68 | 15678, 69 | 16081, 70 | 16485, 71 | 16889, 72 | 17292, 73 | 17695, 74 | 18097, 75 | 18498, 76 | 18897, 77 | 19295, 78 | 19692, 79 | 20086, 80 | 20478, 81 | 20868, 82 | 21255, 83 | 21639, 84 | 22019, 85 | 22397, 86 | 22770, 87 | 23140, 88 | 23506, 89 | 23867, 90 | 24224, 91 | 24576, 92 | 24923, 93 | 25265, 94 | 25602, 95 | 25932, 96 | 26258, 97 | 26577, 98 | 26890, 99 | 27196, 100 | 27496, 101 | 27789, 102 | 28076, 103 | 28355, 104 | 28627, 105 | 28892, 106 | 29148, 107 | 29398, 108 | 29639, 109 | 29872, 110 | 30097, 111 | 30314, 112 | 30522, 113 | 30722, 114 | 30913, 115 | 31095, 116 | 31268, 117 | 31432, 118 | 31588, 119 | 31733, 120 | 31870, 121 | 31997, 122 | 32115, 123 | 32223, 124 | 32321, 125 | 32410, 126 | 32489, 127 | 32558, 128 | 32618, 129 | 32667, 130 | 32707, 131 | 32737, 132 | 32757, 133 | 32767, 134 | 32767, 135 | 32757, 136 | 32737, 137 | 32707, 138 | 32667, 139 | 32618, 140 | 32558, 141 | 32489, 142 | 32410, 143 | 32321, 144 | 32223, 145 | 32115, 146 | 31997, 147 | 31870, 148 | 31733, 149 | 31588, 150 | 31432, 151 | 31268, 152 | 31095, 153 | 30913, 154 | 30722, 155 | 30522, 156 | 30314, 157 | 30097, 158 | 29872, 159 | 29639, 160 | 29398, 161 | 29148, 162 | 28892, 163 | 28627, 164 | 28355, 165 | 28076, 166 | 27789, 167 | 27496, 168 | 27196, 169 | 26890, 170 | 26577, 171 | 26258, 172 | 25932, 173 | 25602, 174 | 25265, 175 | 24923, 176 | 24576, 177 | 24224, 178 | 23867, 179 | 23506, 180 | 23140, 181 | 22770, 182 | 22397, 183 | 22019, 184 | 21639, 185 | 21255, 186 | 20868, 187 | 20478, 188 | 20086, 189 | 19692, 190 | 19295, 191 | 18897, 192 | 18498, 193 | 18097, 194 | 17695, 195 | 17292, 196 | 16889, 197 | 16485, 198 | 16081, 199 | 15678, 200 | 15275, 201 | 14872, 202 | 14471, 203 | 14070, 204 | 13672, 205 | 13274, 206 | 12879, 207 | 12486, 208 | 12095, 209 | 11707, 210 | 11321, 211 | 10939, 212 | 10560, 213 | 10184, 214 | 9812, 215 | 9445, 216 | 9081, 217 | 8722, 218 | 8367, 219 | 8018, 220 | 7673, 221 | 7334, 222 | 7000, 223 | 6672, 224 | 6350, 225 | 6034, 226 | 5724, 227 | 5421, 228 | 5124, 229 | 4834, 230 | 4552, 231 | 4276, 232 | 4008, 233 | 3747, 234 | 3494, 235 | 3249, 236 | 3011, 237 | 2782, 238 | 2561, 239 | 2349, 240 | 2145, 241 | 1949, 242 | 1763, 243 | 1585, 244 | 1416, 245 | 1257, 246 | 1106, 247 | 965, 248 | 833, 249 | 711, 250 | 598, 251 | 495, 252 | 401, 253 | 317, 254 | 243, 255 | 179, 256 | 124, 257 | 80, 258 | 45, 259 | 20, 260 | 5, 261 | 0, 262 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Pintest/Pintest.ino: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | const char *getPort(void *portPtr) { 5 | #ifdef PORTA 6 | if(portPtr == (void*)&PORTA) { return "PORTA"; } 7 | #endif 8 | #ifdef PORTB 9 | if(portPtr == (void*)&PORTB) { return "PORTB"; } 10 | #endif 11 | #ifdef PORTC 12 | if(portPtr == (void*)&PORTC) { return "PORTC"; } 13 | #endif 14 | #ifdef PORTD 15 | if(portPtr == (void*)&PORTD) { return "PORTD"; } 16 | #endif 17 | #ifdef PORTE 18 | if(portPtr == (void*)&PORTE) { return "PORTE"; } 19 | #endif 20 | #ifdef PORTF 21 | if(portPtr == (void*)&PORTF) { return "PORTF"; } 22 | #endif 23 | #ifdef PORTG 24 | if(portPtr == (void*)&PORTG) { return "PORTG"; } 25 | #endif 26 | #ifdef PORTH 27 | if(portPtr == (void*)&PORTH) { return "PORTH"; } 28 | #endif 29 | #ifdef PORTI 30 | if(portPtr == (void*)&PORTI) { return "PORTI"; } 31 | #endif 32 | #ifdef PORTJ 33 | if(portPtr == (void*)&PORTJ) { return "PORTJ"; } 34 | #endif 35 | #ifdef PORTK 36 | if(portPtr == (void*)&PORTK) { return "PORTK"; } 37 | #endif 38 | #ifdef PORTL 39 | if(portPtr == (void*)&PORTL) { return "PORTL"; } 40 | #endif 41 | #ifdef GPIO_A_PDOR 42 | if(portPtr == (void*)&GPIO_A_PDOR) { return "GPIO_A_PDOR"; } 43 | #endif 44 | #ifdef GPIO_B_PDOR 45 | if(portPtr == (void*)&GPIO_B_PDOR) { return "GPIO_B_PDOR"; } 46 | #endif 47 | #ifdef GPIO_C_PDOR 48 | if(portPtr == (void*)&GPIO_C_PDOR) { return "GPIO_C_PDOR"; } 49 | #endif 50 | #ifdef GPIO_D_PDOR 51 | if(portPtr == (void*)&GPIO_D_PDOR) { return "GPIO_D_PDOR"; } 52 | #endif 53 | #ifdef GPIO_E_PDOR 54 | if(portPtr == (void*)&GPIO_E_PDOR) { return "GPIO_E_PDOR"; } 55 | #endif 56 | #ifdef REG_PIO_A_ODSR 57 | if(portPtr == (void*)®_PIO_A_ODSR) { return "REG_PIO_A_ODSR"; } 58 | #endif 59 | #ifdef REG_PIO_B_ODSR 60 | if(portPtr == (void*)®_PIO_B_ODSR) { return "REG_PIO_B_ODSR"; } 61 | #endif 62 | #ifdef REG_PIO_C_ODSR 63 | if(portPtr == (void*)®_PIO_C_ODSR) { return "REG_PIO_C_ODSR"; } 64 | #endif 65 | #ifdef REG_PIO_D_ODSR 66 | if(portPtr == (void*)®_PIO_D_ODSR) { return "REG_PIO_D_ODSR"; } 67 | #endif 68 | return "unknown"; 69 | } 70 | 71 | template void CheckPin() 72 | { 73 | CheckPin(); 74 | 75 | RwReg *systemThinksPortIs = portOutputRegister(digitalPinToPort(PIN)); 76 | RwReg systemThinksMaskIs = digitalPinToBitMask(PIN); 77 | 78 | Serial.print("Pin "); Serial.print(PIN); Serial.print(": Port "); 79 | 80 | if(systemThinksPortIs == FastPin::port()) { 81 | Serial.print("valid & mask "); 82 | } else { 83 | Serial.print("invalid, is "); Serial.print(getPort((void*)FastPin::port())); Serial.print(" should be "); 84 | Serial.print(getPort((void*)systemThinksPortIs)); 85 | Serial.print(" & mask "); 86 | } 87 | 88 | if(systemThinksMaskIs == FastPin::mask()) { 89 | Serial.println("valid."); 90 | } else { 91 | Serial.print("invalid, is "); Serial.print(FastPin::mask()); Serial.print(" should be "); Serial.println(systemThinksMaskIs); 92 | } 93 | } 94 | 95 | template<> void CheckPin<-1> () {} 96 | 97 | void setup() { 98 | Serial.begin(38400); 99 | Serial.println("resetting!"); 100 | } 101 | 102 | void loop() { 103 | CheckPin(); 104 | delay(10000); 105 | } -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/RGBCalibrate/RGBCalibrate.ino: -------------------------------------------------------------------------------- 1 | #include "FastLED.h" 2 | 3 | 4 | //////////////////////////////////////////////////////////////////////////////////////////////////// 5 | // 6 | // RGB Calibration code 7 | // 8 | // Use this sketch to determine what the RGB ordering for your chipset should be. Steps for setting up to use: 9 | 10 | // * Uncomment the line in setup that corresponds to the LED chipset that you are using. (Note that they 11 | // all explicitly specify the RGB order as RGB) 12 | // * Define DATA_PIN to the pin that data is connected to. 13 | // * (Optional) if using software SPI for chipsets that are SPI based, define CLOCK_PIN to the clock pin 14 | // * Compile/upload/run the sketch 15 | 16 | // You should see six leds on. If the RGB ordering is correct, you should see 1 red led, 2 green 17 | // leds, and 3 blue leds. If you see different colors, the count of each color tells you what the 18 | // position for that color in the rgb orering should be. So, for example, if you see 1 Blue, and 2 19 | // Red, and 3 Green leds then the rgb ordering should be BRG (Blue, Red, Green). 20 | 21 | // You can then test this ordering by setting the RGB ordering in the addLeds line below to the new ordering 22 | // and it should come out correctly, 1 red, 2 green, and 3 blue. 23 | // 24 | ////////////////////////////////////////////////// 25 | 26 | #define NUM_LEDS 6 27 | 28 | // Data pin that led data will be written out over 29 | #define DATA_PIN 6 30 | // Clock pin only needed for SPI based chipsets when not using hardware SPI 31 | //#define CLOCK_PIN 8 32 | 33 | CRGB leds[NUM_LEDS]; 34 | 35 | void setup() { 36 | // sanity check delay - allows reprogramming if accidently blowing power w/leds 37 | delay(2000); 38 | 39 | // Uncomment one of the following lines for your leds arrangement. 40 | // FastLED.addLeds(leds, NUM_LEDS); 41 | // FastLED.addLeds(leds, NUM_LEDS); 42 | // FastLED.addLeds(leds, NUM_LEDS); 43 | // FastLED.addLeds(leds, NUM_LEDS); 44 | // FastLED.addLeds(leds, NUM_LEDS); 45 | // FastLED.addLeds(leds, NUM_LEDS); 46 | // FastLED.setBrightness(CRGB(255,255,255)); 47 | // FastLED.addLeds(leds, NUM_LEDS); 48 | // FastLED.addLeds(leds, NUM_LEDS); 49 | // FastLED.addLeds(leds, NUM_LEDS); 50 | // FastLED.addLeds(leds, NUM_LEDS); 51 | 52 | // FastLED.addLeds(leds, NUM_LEDS); 53 | // FastLED.addLeds(leds, NUM_LEDS); 54 | FastLED.addLeds(leds, NUM_LEDS); 55 | 56 | // FastLED.addLeds(leds, NUM_LEDS); 57 | // FastLED.addLeds(leds, NUM_LEDS); 58 | // FastLED.addLeds(leds, NUM_LEDS); 59 | } 60 | 61 | void loop() { 62 | leds[0] = CRGB(255,0,0); 63 | leds[1] = CRGB(0,255,0); 64 | leds[2] = CRGB(0,255,0); 65 | leds[3] = CRGB(0,0,255); 66 | leds[4] = CRGB(0,0,255); 67 | leds[5] = CRGB(0,0,255); 68 | FastLED.show(); 69 | delay(1000); 70 | } 71 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/src/LiquidCrystal.h: -------------------------------------------------------------------------------- 1 | #ifndef LiquidCrystal_h 2 | #define LiquidCrystal_h 3 | 4 | #include 5 | #include "Print.h" 6 | 7 | // commands 8 | #define LCD_CLEARDISPLAY 0x01 9 | #define LCD_RETURNHOME 0x02 10 | #define LCD_ENTRYMODESET 0x04 11 | #define LCD_DISPLAYCONTROL 0x08 12 | #define LCD_CURSORSHIFT 0x10 13 | #define LCD_FUNCTIONSET 0x20 14 | #define LCD_SETCGRAMADDR 0x40 15 | #define LCD_SETDDRAMADDR 0x80 16 | 17 | // flags for display entry mode 18 | #define LCD_ENTRYRIGHT 0x00 19 | #define LCD_ENTRYLEFT 0x02 20 | #define LCD_ENTRYSHIFTINCREMENT 0x01 21 | #define LCD_ENTRYSHIFTDECREMENT 0x00 22 | 23 | // flags for display on/off control 24 | #define LCD_DISPLAYON 0x04 25 | #define LCD_DISPLAYOFF 0x00 26 | #define LCD_CURSORON 0x02 27 | #define LCD_CURSOROFF 0x00 28 | #define LCD_BLINKON 0x01 29 | #define LCD_BLINKOFF 0x00 30 | 31 | // flags for display/cursor shift 32 | #define LCD_DISPLAYMOVE 0x08 33 | #define LCD_CURSORMOVE 0x00 34 | #define LCD_MOVERIGHT 0x04 35 | #define LCD_MOVELEFT 0x00 36 | 37 | // flags for function set 38 | #define LCD_8BITMODE 0x10 39 | #define LCD_4BITMODE 0x00 40 | #define LCD_2LINE 0x08 41 | #define LCD_1LINE 0x00 42 | #define LCD_5x10DOTS 0x04 43 | #define LCD_5x8DOTS 0x00 44 | 45 | class LiquidCrystal : public Print { 46 | public: 47 | LiquidCrystal(uint8_t rs, uint8_t enable, 48 | uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, 49 | uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7); 50 | LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable, 51 | uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, 52 | uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7); 53 | LiquidCrystal(uint8_t rs, uint8_t rw, uint8_t enable, 54 | uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3); 55 | LiquidCrystal(uint8_t rs, uint8_t enable, 56 | uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3); 57 | 58 | void init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable, 59 | uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, 60 | uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7); 61 | 62 | void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS); 63 | 64 | void clear(); 65 | void home(); 66 | 67 | void noDisplay(); 68 | void display(); 69 | void noBlink(); 70 | void blink(); 71 | void noCursor(); 72 | void cursor(); 73 | void scrollDisplayLeft(); 74 | void scrollDisplayRight(); 75 | void leftToRight(); 76 | void rightToLeft(); 77 | void autoscroll(); 78 | void noAutoscroll(); 79 | 80 | void setRowOffsets(int row1, int row2, int row3, int row4); 81 | void createChar(uint8_t, uint8_t[]); 82 | void setCursor(uint8_t, uint8_t); 83 | virtual size_t write(uint8_t); 84 | void command(uint8_t); 85 | 86 | using Print::write; 87 | private: 88 | void send(uint8_t, uint8_t); 89 | void write4bits(uint8_t); 90 | void write8bits(uint8_t); 91 | void pulseEnable(); 92 | 93 | uint8_t _rs_pin; // LOW: command. HIGH: character. 94 | uint8_t _rw_pin; // LOW: write to LCD. HIGH: read from LCD. 95 | uint8_t _enable_pin; // activated by a HIGH pulse. 96 | uint8_t _data_pins[8]; 97 | 98 | uint8_t _displayfunction; 99 | uint8_t _displaycontrol; 100 | uint8_t _displaymode; 101 | 102 | uint8_t _initialized; 103 | 104 | uint8_t _numlines; 105 | uint8_t _row_offsets[4]; 106 | }; 107 | 108 | #endif 109 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/ColorTemperature/ColorTemperature.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define LED_PIN 3 4 | 5 | // Information about the LED strip itself 6 | #define NUM_LEDS 60 7 | #define CHIPSET WS2811 8 | #define COLOR_ORDER GRB 9 | CRGB leds[NUM_LEDS]; 10 | 11 | #define BRIGHTNESS 128 12 | 13 | 14 | // FastLED v2.1 provides two color-management controls: 15 | // (1) color correction settings for each LED strip, and 16 | // (2) master control of the overall output 'color temperature' 17 | // 18 | // THIS EXAMPLE demonstrates the second, "color temperature" control. 19 | // It shows a simple rainbow animation first with one temperature profile, 20 | // and a few seconds later, with a different temperature profile. 21 | // 22 | // The first pixel of the strip will show the color temperature. 23 | // 24 | // HELPFUL HINTS for "seeing" the effect in this demo: 25 | // * Don't look directly at the LED pixels. Shine the LEDs aganst 26 | // a white wall, table, or piece of paper, and look at the reflected light. 27 | // 28 | // * If you watch it for a bit, and then walk away, and then come back 29 | // to it, you'll probably be able to "see" whether it's currently using 30 | // the 'redder' or the 'bluer' temperature profile, even not counting 31 | // the lowest 'indicator' pixel. 32 | // 33 | // 34 | // FastLED provides these pre-conigured incandescent color profiles: 35 | // Candle, Tungsten40W, Tungsten100W, Halogen, CarbonArc, 36 | // HighNoonSun, DirectSunlight, OvercastSky, ClearBlueSky, 37 | // FastLED provides these pre-configured gaseous-light color profiles: 38 | // WarmFluorescent, StandardFluorescent, CoolWhiteFluorescent, 39 | // FullSpectrumFluorescent, GrowLightFluorescent, BlackLightFluorescent, 40 | // MercuryVapor, SodiumVapor, MetalHalide, HighPressureSodium, 41 | // FastLED also provides an "Uncorrected temperature" profile 42 | // UncorrectedTemperature; 43 | 44 | #define TEMPERATURE_1 Tungsten100W 45 | #define TEMPERATURE_2 OvercastSky 46 | 47 | // How many seconds to show each temperature before switching 48 | #define DISPLAYTIME 20 49 | // How many seconds to show black between switches 50 | #define BLACKTIME 3 51 | 52 | void loop() 53 | { 54 | // draw a generic, no-name rainbow 55 | static uint8_t starthue = 0; 56 | fill_rainbow( leds + 5, NUM_LEDS - 5, --starthue, 20); 57 | 58 | // Choose which 'color temperature' profile to enable. 59 | uint8_t secs = (millis() / 1000) % (DISPLAYTIME * 2); 60 | if( secs < DISPLAYTIME) { 61 | FastLED.setTemperature( TEMPERATURE_1 ); // first temperature 62 | leds[0] = TEMPERATURE_1; // show indicator pixel 63 | } else { 64 | FastLED.setTemperature( TEMPERATURE_2 ); // second temperature 65 | leds[0] = TEMPERATURE_2; // show indicator pixel 66 | } 67 | 68 | // Black out the LEDs for a few secnds between color changes 69 | // to let the eyes and brains adjust 70 | if( (secs % DISPLAYTIME) < BLACKTIME) { 71 | memset8( leds, 0, NUM_LEDS * sizeof(CRGB)); 72 | } 73 | 74 | FastLED.show(); 75 | FastLED.delay(8); 76 | } 77 | 78 | void setup() { 79 | delay( 3000 ); // power-up safety delay 80 | // It's important to set the color correction for your LED strip here, 81 | // so that colors can be more accurately rendered through the 'temperature' profiles 82 | FastLED.addLeds(leds, NUM_LEDS).setCorrection( TypicalSMD5050 ); 83 | FastLED.setBrightness( BRIGHTNESS ); 84 | } 85 | 86 | -------------------------------------------------------------------------------- /Libraries/LiquidCrystal/examples/CustomCharacter/CustomCharacter.ino: -------------------------------------------------------------------------------- 1 | /* 2 | LiquidCrystal Library - Custom Characters 3 | 4 | Demonstrates how to add custom characters on an LCD display. 5 | The LiquidCrystal library works with all LCD displays that are 6 | compatible with the Hitachi HD44780 driver. There are many of 7 | them out there, and you can usually tell them by the 16-pin interface. 8 | 9 | This sketch prints "I Arduino!" and a little dancing man 10 | to the LCD. 11 | 12 | The circuit: 13 | * LCD RS pin to digital pin 12 14 | * LCD Enable pin to digital pin 11 15 | * LCD D4 pin to digital pin 5 16 | * LCD D5 pin to digital pin 4 17 | * LCD D6 pin to digital pin 3 18 | * LCD D7 pin to digital pin 2 19 | * LCD R/W pin to ground 20 | * 10K potentiometer: 21 | * ends to +5V and ground 22 | * wiper to LCD VO pin (pin 3) 23 | * 10K poterntiometer on pin A0 24 | 25 | created 21 Mar 2011 26 | by Tom Igoe 27 | modified 11 Nov 2013 28 | by Scott Fitzgerald 29 | 30 | Based on Adafruit's example at 31 | https://github.com/adafruit/SPI_VFD/blob/master/examples/createChar/createChar.pde 32 | 33 | This example code is in the public domain. 34 | http://www.arduino.cc/en/Tutorial/LiquidCrystal 35 | 36 | Also useful: 37 | http://icontexto.com/charactercreator/ 38 | 39 | */ 40 | 41 | // include the library code: 42 | #include 43 | 44 | // initialize the library with the numbers of the interface pins 45 | LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 46 | 47 | // make some custom characters: 48 | byte heart[8] = { 49 | 0b00000, 50 | 0b01010, 51 | 0b11111, 52 | 0b11111, 53 | 0b11111, 54 | 0b01110, 55 | 0b00100, 56 | 0b00000 57 | }; 58 | 59 | byte smiley[8] = { 60 | 0b00000, 61 | 0b00000, 62 | 0b01010, 63 | 0b00000, 64 | 0b00000, 65 | 0b10001, 66 | 0b01110, 67 | 0b00000 68 | }; 69 | 70 | byte frownie[8] = { 71 | 0b00000, 72 | 0b00000, 73 | 0b01010, 74 | 0b00000, 75 | 0b00000, 76 | 0b00000, 77 | 0b01110, 78 | 0b10001 79 | }; 80 | 81 | byte armsDown[8] = { 82 | 0b00100, 83 | 0b01010, 84 | 0b00100, 85 | 0b00100, 86 | 0b01110, 87 | 0b10101, 88 | 0b00100, 89 | 0b01010 90 | }; 91 | 92 | byte armsUp[8] = { 93 | 0b00100, 94 | 0b01010, 95 | 0b00100, 96 | 0b10101, 97 | 0b01110, 98 | 0b00100, 99 | 0b00100, 100 | 0b01010 101 | }; 102 | 103 | void setup() { 104 | // initialize LCD and set up the number of columns and rows: 105 | lcd.begin(16, 2); 106 | 107 | // create a new character 108 | lcd.createChar(0, heart); 109 | // create a new character 110 | lcd.createChar(1, smiley); 111 | // create a new character 112 | lcd.createChar(2, frownie); 113 | // create a new character 114 | lcd.createChar(3, armsDown); 115 | // create a new character 116 | lcd.createChar(4, armsUp); 117 | 118 | // Print a message to the lcd. 119 | lcd.print("I "); 120 | lcd.write(byte(0)); // when calling lcd.write() '0' must be cast as a byte 121 | lcd.print(" Arduino! "); 122 | lcd.write((byte) 1); 123 | 124 | } 125 | 126 | void loop() { 127 | // read the potentiometer on A0: 128 | int sensorReading = analogRead(A0); 129 | // map the result to 200 - 1000: 130 | int delayTime = map(sensorReading, 0, 1023, 200, 1000); 131 | // set the cursor to the bottom row, 5th position: 132 | lcd.setCursor(4, 1); 133 | // draw the little man, arms down: 134 | lcd.write(3); 135 | delay(delayTime); 136 | lcd.setCursor(4, 1); 137 | // draw him arms up: 138 | lcd.write(4); 139 | delay(delayTime); 140 | } 141 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/fastspi_ref.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_FASTSPI_ARM_SAM_H 2 | #define __INC_FASTSPI_ARM_SAM_H 3 | 4 | #if 0 // guard against the arduino ide idiotically including every header file 5 | #include "FastLED.h" 6 | 7 | FASTLED_NAMESPACE_BEGIN 8 | 9 | // A skeletal implementation of hardware SPI support. Fill in the necessary code for init, waiting, and writing. The rest of 10 | // the method implementations should provide a starting point, even if not hte most efficient to start with 11 | template 12 | class REFHardwareSPIOutput { 13 | Selectable *m_pSelect; 14 | public: 15 | SAMHardwareSPIOutput() { m_pSelect = NULL; } 16 | SAMHArdwareSPIOutput(Selectable *pSelect) { m_pSelect = pSelect; } 17 | 18 | // set the object representing the selectable 19 | void setSelect(Selectable *pSelect) { /* TODO */ } 20 | 21 | // initialize the SPI subssytem 22 | void init() { /* TODO */ } 23 | 24 | // latch the CS select 25 | void inline select() __attribute__((always_inline)) { if(m_pSelect != NULL) { m_pSelect->select(); } } 26 | 27 | // release the CS select 28 | void inline release() __attribute__((always_inline)) { if(m_pSelect != NULL) { m_pSelect->release(); } } 29 | 30 | // wait until all queued up data has been written 31 | static void waitFully() { /* TODO */ } 32 | 33 | // write a byte out via SPI (returns immediately on writing register) 34 | static void writeByte(uint8_t b) { /* TODO */ } 35 | 36 | // write a word out via SPI (returns immediately on writing register) 37 | static void writeWord(uint16_t w) { /* TODO */ } 38 | 39 | // A raw set of writing byte values, assumes setup/init/waiting done elsewhere 40 | static void writeBytesValueRaw(uint8_t value, int len) { 41 | while(len--) { writeByte(value); } 42 | } 43 | 44 | // A full cycle of writing a value for len bytes, including select, release, and waiting 45 | void writeBytesValue(uint8_t value, int len) { 46 | select(); writeBytesValueRaw(value, len); release(); 47 | } 48 | 49 | // A full cycle of writing a value for len bytes, including select, release, and waiting 50 | template void writeBytes(register uint8_t *data, int len) { 51 | uint8_t *end = data + len; 52 | select(); 53 | // could be optimized to write 16bit words out instead of 8bit bytes 54 | while(data != end) { 55 | writeByte(D::adjust(*data++)); 56 | } 57 | D::postBlock(len); 58 | waitFully(); 59 | release(); 60 | } 61 | 62 | // A full cycle of writing a value for len bytes, including select, release, and waiting 63 | void writeBytes(register uint8_t *data, int len) { writeBytes(data, len); } 64 | 65 | // write a single bit out, which bit from the passed in byte is determined by template parameter 66 | template inline static void writeBit(uint8_t b) { /* TODO */ } 67 | 68 | // write a block of uint8_ts out in groups of three. len is the total number of uint8_ts to write out. The template 69 | // parameters indicate how many uint8_ts to skip at the beginning and/or end of each grouping 70 | template void writePixels(PixelController pixels) { 71 | select(); 72 | while(data != end) { 73 | if(FLAGS & FLAG_START_BIT) { 74 | writeBit<0>(1); 75 | } 76 | writeByte(D::adjust(pixels.loadAndScale0())); 77 | writeByte(D::adjust(pixels.loadAndScale1())); 78 | writeByte(D::adjust(pixels.loadAndScale2())); 79 | 80 | pixels.advanceData(); 81 | pixels.stepDithering(); 82 | data += (3+skip); 83 | } 84 | D::postBlock(len); 85 | release(); 86 | } 87 | 88 | }; 89 | 90 | FASTLED_NAMESPACE_END 91 | 92 | #endif 93 | 94 | #endif 95 | 96 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/FirstLight/FirstLight.ino: -------------------------------------------------------------------------------- 1 | // Use if you want to force the software SPI subsystem to be used for some reason (generally, you don't) 2 | // #define FASTLED_FORCE_SOFTWARE_SPI 3 | // Use if you want to force non-accelerated pin access (hint: you really don't, it breaks lots of things) 4 | // #define FASTLED_FORCE_SOFTWARE_SPI 5 | // #define FASTLED_FORCE_SOFTWARE_PINS 6 | #include "FastLED.h" 7 | 8 | /////////////////////////////////////////////////////////////////////////////////////////// 9 | // 10 | // Move a white dot along the strip of leds. This program simply shows how to configure the leds, 11 | // and then how to turn a single pixel white and then off, moving down the line of pixels. 12 | // 13 | 14 | // How many leds are in the strip? 15 | #define NUM_LEDS 60 16 | 17 | // Data pin that led data will be written out over 18 | #define DATA_PIN 3 19 | 20 | // Clock pin only needed for SPI based chipsets when not using hardware SPI 21 | //#define CLOCK_PIN 8 22 | 23 | // This is an array of leds. One item for each led in your strip. 24 | CRGB leds[NUM_LEDS]; 25 | 26 | // This function sets up the ledsand tells the controller about them 27 | void setup() { 28 | // sanity check delay - allows reprogramming if accidently blowing power w/leds 29 | delay(2000); 30 | 31 | // Uncomment one of the following lines for your leds arrangement. 32 | // FastLED.addLeds(leds, NUM_LEDS); 33 | // FastLED.addLeds(leds, NUM_LEDS); 34 | // FastLED.addLeds(leds, NUM_LEDS); 35 | FastLED.addLeds(leds, NUM_LEDS); 36 | // FastLED.addLeds(leds, NUM_LEDS); 37 | // FastLED.addLeds(leds, NUM_LEDS); 38 | // FastLED.addLeds(leds, NUM_LEDS); 39 | // FastLED.addLeds(leds, NUM_LEDS); 40 | // FastLED.addLeds(leds, NUM_LEDS); 41 | // FastLED.addLeds(leds, NUM_LEDS); 42 | // FastLED.addLeds(leds, NUM_LEDS); 43 | // FastLED.addLeds(leds, NUM_LEDS); 44 | // FastLED.addLeds(leds, NUM_LEDS); 45 | 46 | // FastLED.addLeds(leds, NUM_LEDS); 47 | // FastLED.addLeds(leds, NUM_LEDS); 48 | // FastLED.addLeds(leds, NUM_LEDS); 49 | // FastLED.addLeds(leds, NUM_LEDS); 50 | // FastLED.addLeds(leds, NUM_LEDS); 51 | // FastLED.addLeds(leds, NUM_LEDS); 52 | 53 | // FastLED.addLeds(leds, NUM_LEDS); 54 | // FastLED.addLeds(leds, NUM_LEDS); 55 | // FastLED.addLeds(leds, NUM_LEDS); 56 | // FastLED.addLeds(leds, NUM_LEDS); 57 | // FastLED.addLeds(leds, NUM_LEDS); 58 | // FastLED.addLeds(leds, NUM_LEDS); 59 | } 60 | 61 | // This function runs over and over, and is where you do the magic to light 62 | // your leds. 63 | void loop() { 64 | // Move a single white led 65 | for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) { 66 | // Turn our current led on to white, then show the leds 67 | leds[whiteLed] = CRGB::White; 68 | 69 | // Show the leds (only one of which is set to white, from above) 70 | FastLED.show(); 71 | 72 | // Wait a little bit 73 | delay(100); 74 | 75 | // Turn our current led back to black for the next loop around 76 | leds[whiteLed] = CRGB::Black; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Noise/Noise.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // 4 | // Mark's xy coordinate mapping code. See the XYMatrix for more information on it. 5 | // 6 | 7 | // Params for width and height 8 | const uint8_t kMatrixWidth = 16; 9 | const uint8_t kMatrixHeight = 16; 10 | #define MAX_DIMENSION ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight) 11 | #define NUM_LEDS (kMatrixWidth * kMatrixHeight) 12 | // Param for different pixel layouts 13 | const bool kMatrixSerpentineLayout = true; 14 | 15 | 16 | uint16_t XY( uint8_t x, uint8_t y) 17 | { 18 | uint16_t i; 19 | 20 | if( kMatrixSerpentineLayout == false) { 21 | i = (y * kMatrixWidth) + x; 22 | } 23 | 24 | if( kMatrixSerpentineLayout == true) { 25 | if( y & 0x01) { 26 | // Odd rows run backwards 27 | uint8_t reverseX = (kMatrixWidth - 1) - x; 28 | i = (y * kMatrixWidth) + reverseX; 29 | } else { 30 | // Even rows run forwards 31 | i = (y * kMatrixWidth) + x; 32 | } 33 | } 34 | 35 | return i; 36 | } 37 | 38 | // The leds 39 | CRGB leds[kMatrixWidth * kMatrixHeight]; 40 | 41 | // The 32bit version of our coordinates 42 | static uint16_t x; 43 | static uint16_t y; 44 | static uint16_t z; 45 | 46 | // We're using the x/y dimensions to map to the x/y pixels on the matrix. We'll 47 | // use the z-axis for "time". speed determines how fast time moves forward. Try 48 | // 1 for a very slow moving effect, or 60 for something that ends up looking like 49 | // water. 50 | // uint16_t speed = 1; // almost looks like a painting, moves very slowly 51 | uint16_t speed = 20; // a nice starting speed, mixes well with a scale of 100 52 | // uint16_t speed = 33; 53 | // uint16_t speed = 100; // wicked fast! 54 | 55 | // Scale determines how far apart the pixels in our noise matrix are. Try 56 | // changing these values around to see how it affects the motion of the display. The 57 | // higher the value of scale, the more "zoomed out" the noise iwll be. A value 58 | // of 1 will be so zoomed in, you'll mostly see solid colors. 59 | 60 | // uint16_t scale = 1; // mostly just solid colors 61 | // uint16_t scale = 4011; // very zoomed out and shimmery 62 | uint16_t scale = 311; 63 | 64 | // This is the array that we keep our computed noise values in 65 | uint8_t noise[MAX_DIMENSION][MAX_DIMENSION]; 66 | 67 | void setup() { 68 | // uncomment the following lines if you want to see FPS count information 69 | // Serial.begin(38400); 70 | // Serial.println("resetting!"); 71 | delay(3000); 72 | LEDS.addLeds(leds,NUM_LEDS); 73 | LEDS.setBrightness(96); 74 | 75 | // Initialize our coordinates to some random values 76 | x = random16(); 77 | y = random16(); 78 | z = random16(); 79 | } 80 | 81 | // Fill the x/y array of 8-bit noise values using the inoise8 function. 82 | void fillnoise8() { 83 | for(int i = 0; i < MAX_DIMENSION; i++) { 84 | int ioffset = scale * i; 85 | for(int j = 0; j < MAX_DIMENSION; j++) { 86 | int joffset = scale * j; 87 | noise[i][j] = inoise8(x + ioffset,y + joffset,z); 88 | } 89 | } 90 | z += speed; 91 | } 92 | 93 | 94 | void loop() { 95 | static uint8_t ihue=0; 96 | fillnoise8(); 97 | for(int i = 0; i < kMatrixWidth; i++) { 98 | for(int j = 0; j < kMatrixHeight; j++) { 99 | // We use the value at the (i,j) coordinate in the noise 100 | // array for our brightness, and the flipped value from (j,i) 101 | // for our pixel's hue. 102 | leds[XY(i,j)] = CHSV(noise[j][i],255,noise[i][j]); 103 | 104 | // You can also explore other ways to constrain the hue used, like below 105 | // leds[XY(i,j)] = CHSV(ihue + (noise[j][i]>>2),255,noise[i][j]); 106 | } 107 | } 108 | ihue+=1; 109 | 110 | LEDS.show(); 111 | // delay(10); 112 | } 113 | -------------------------------------------------------------------------------- /Libraries/arduino-Max72xxPanel-master/Max72xxPanel.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | A library for controling a set of 8x8 LEDs with a MAX7219 or 3 | MAX7221 displays. 4 | 5 | This is a plugin for Adafruit's core graphics library, providing 6 | basic graphics primitives (points, lines, circles, etc.). 7 | You need to download and install Adafruit_GFX to use this library. 8 | 9 | Adafruit invests time and resources providing this open 10 | source code, please support Adafruit and open-source hardware 11 | by purchasing products from Adafruit! 12 | 13 | Written by Mark Ruys, 2013. 14 | BSD license, check license.txt for more information. 15 | All text above must be included in any redistribution. 16 | 17 | Datasheet: http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf 18 | 19 | ******************************************************************/ 20 | 21 | #ifndef Max72xxPanel_h 22 | #define Max72xxPanel_h 23 | 24 | #if (ARDUINO >= 100) 25 | #include 26 | #else 27 | #include 28 | #include "pins_arduino.h" 29 | #endif 30 | 31 | class Max72xxPanel : public Adafruit_GFX { 32 | 33 | public: 34 | 35 | /* 36 | * Create a new controler 37 | * Parameters: 38 | * csPin pin for selecting the device 39 | * hDisplays number of displays horizontally 40 | * vDisplays number of displays vertically 41 | */ 42 | Max72xxPanel(byte csPin, byte hDisplays=1, byte vDisplays=1); 43 | 44 | /* 45 | * Define how the displays are ordered. The first display (0) 46 | * is the one closest to the Arduino. 47 | */ 48 | void setPosition(byte display, byte x, byte y); 49 | 50 | /* 51 | * Define if and how the displays are rotated. The first display 52 | * (0) is the one closest to the Arduino. rotation can be: 53 | * 0: no rotation 54 | * 1: 90 degrees clockwise 55 | * 2: 180 degrees 56 | * 3: 90 degrees counter clockwise 57 | */ 58 | void setRotation(byte display, byte rotation); 59 | 60 | /* 61 | * Implementation of Adafruit's setRotation(). Probably, you don't 62 | * need this function as you can achieve the same result by using 63 | * the previous two functions. 64 | */ 65 | void setRotation(byte rotation); 66 | 67 | /* 68 | * Draw a pixel on your canvas. Note that for performance reasons, 69 | * the pixels are not actually send to the displays. Only the internal 70 | * bitmap buffer is modified. 71 | */ 72 | void drawPixel(int16_t x, int16_t y, uint16_t color); 73 | 74 | /* 75 | * As we can do this much faster then setting all the pixels one by 76 | * one, we have a dedicated function to clear the screen. 77 | * The color can be 0 (blank) or non-zero (pixel on). 78 | */ 79 | void fillScreen(uint16_t color); 80 | 81 | /* 82 | * Set the shutdown (power saving) mode for the device 83 | * Paramaters: 84 | * status If true the device goes into power-down mode. Set to false 85 | * for normal operation. 86 | */ 87 | void shutdown(boolean status); 88 | 89 | /* 90 | * Set the brightness of the display. 91 | * Paramaters: 92 | * intensity the brightness of the display. (0..15) 93 | */ 94 | void setIntensity(byte intensity); 95 | 96 | /* 97 | * After you're done filling the bitmap buffer with your picture, 98 | * send it to the display(s). 99 | */ 100 | void write(); 101 | 102 | private: 103 | byte SPI_CS; /* SPI chip selection */ 104 | 105 | /* Send out a single command to the device */ 106 | void spiTransfer(byte opcode, byte data=0); 107 | 108 | /* We keep track of the led-status for 8 devices in this array */ 109 | byte *bitmap; 110 | byte bitmapSize; 111 | 112 | byte hDisplays; 113 | byte *matrixPosition; 114 | byte *matrixRotation; 115 | }; 116 | 117 | #endif // Max72xxPanel_h 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/examples/Fire2012/Fire2012.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define LED_PIN 5 4 | #define COLOR_ORDER GRB 5 | #define CHIPSET WS2811 6 | #define NUM_LEDS 30 7 | 8 | #define BRIGHTNESS 200 9 | #define FRAMES_PER_SECOND 60 10 | 11 | bool gReverseDirection = false; 12 | 13 | CRGB leds[NUM_LEDS]; 14 | 15 | void setup() { 16 | delay(3000); // sanity delay 17 | FastLED.addLeds(leds, NUM_LEDS).setCorrection( TypicalLEDStrip ); 18 | FastLED.setBrightness( BRIGHTNESS ); 19 | } 20 | 21 | void loop() 22 | { 23 | // Add entropy to random number generator; we use a lot of it. 24 | // random16_add_entropy( random()); 25 | 26 | Fire2012(); // run simulation frame 27 | 28 | FastLED.show(); // display this frame 29 | FastLED.delay(1000 / FRAMES_PER_SECOND); 30 | } 31 | 32 | 33 | // Fire2012 by Mark Kriegsman, July 2012 34 | // as part of "Five Elements" shown here: http://youtu.be/knWiGsmgycY 35 | //// 36 | // This basic one-dimensional 'fire' simulation works roughly as follows: 37 | // There's a underlying array of 'heat' cells, that model the temperature 38 | // at each point along the line. Every cycle through the simulation, 39 | // four steps are performed: 40 | // 1) All cells cool down a little bit, losing heat to the air 41 | // 2) The heat from each cell drifts 'up' and diffuses a little 42 | // 3) Sometimes randomly new 'sparks' of heat are added at the bottom 43 | // 4) The heat from each cell is rendered as a color into the leds array 44 | // The heat-to-color mapping uses a black-body radiation approximation. 45 | // 46 | // Temperature is in arbitrary units from 0 (cold black) to 255 (white hot). 47 | // 48 | // This simulation scales it self a bit depending on NUM_LEDS; it should look 49 | // "OK" on anywhere from 20 to 100 LEDs without too much tweaking. 50 | // 51 | // I recommend running this simulation at anywhere from 30-100 frames per second, 52 | // meaning an interframe delay of about 10-35 milliseconds. 53 | // 54 | // Looks best on a high-density LED setup (60+ pixels/meter). 55 | // 56 | // 57 | // There are two main parameters you can play with to control the look and 58 | // feel of your fire: COOLING (used in step 1 above), and SPARKING (used 59 | // in step 3 above). 60 | // 61 | // COOLING: How much does the air cool as it rises? 62 | // Less cooling = taller flames. More cooling = shorter flames. 63 | // Default 50, suggested range 20-100 64 | #define COOLING 55 65 | 66 | // SPARKING: What chance (out of 255) is there that a new spark will be lit? 67 | // Higher chance = more roaring fire. Lower chance = more flickery fire. 68 | // Default 120, suggested range 50-200. 69 | #define SPARKING 120 70 | 71 | 72 | void Fire2012() 73 | { 74 | // Array of temperature readings at each simulation cell 75 | static byte heat[NUM_LEDS]; 76 | 77 | // Step 1. Cool down every cell a little 78 | for( int i = 0; i < NUM_LEDS; i++) { 79 | heat[i] = qsub8( heat[i], random8(0, ((COOLING * 10) / NUM_LEDS) + 2)); 80 | } 81 | 82 | // Step 2. Heat from each cell drifts 'up' and diffuses a little 83 | for( int k= NUM_LEDS - 1; k >= 2; k--) { 84 | heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2] ) / 3; 85 | } 86 | 87 | // Step 3. Randomly ignite new 'sparks' of heat near the bottom 88 | if( random8() < SPARKING ) { 89 | int y = random8(7); 90 | heat[y] = qadd8( heat[y], random8(160,255) ); 91 | } 92 | 93 | // Step 4. Map from heat cells to LED colors 94 | for( int j = 0; j < NUM_LEDS; j++) { 95 | CRGB color = HeatColor( heat[j]); 96 | int pixelnumber; 97 | if( gReverseDirection ) { 98 | pixelnumber = (NUM_LEDS-1) - j; 99 | } else { 100 | pixelnumber = j; 101 | } 102 | leds[pixelnumber] = color; 103 | } 104 | } 105 | 106 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/hsv2rgb.h: -------------------------------------------------------------------------------- 1 | #ifndef __INC_HSV2RGB_H 2 | #define __INC_HSV2RGB_H 3 | 4 | #include "FastLED.h" 5 | 6 | #include "pixeltypes.h" 7 | 8 | FASTLED_NAMESPACE_BEGIN 9 | 10 | // hsv2rgb_rainbow - convert a hue, saturation, and value to RGB 11 | // using a visually balanced rainbow (vs a straight 12 | // mathematical spectrum). 13 | // This 'rainbow' yields better yellow and orange 14 | // than a straight 'spectrum'. 15 | // 16 | // NOTE: here hue is 0-255, not just 0-191 17 | 18 | void hsv2rgb_rainbow( const struct CHSV& hsv, struct CRGB& rgb); 19 | void hsv2rgb_rainbow( const struct CHSV* phsv, struct CRGB * prgb, int numLeds); 20 | #define HUE_MAX_RAINBOW 255 21 | 22 | 23 | // hsv2rgb_spectrum - convert a hue, saturation, and value to RGB 24 | // using a mathematically straight spectrum (vs 25 | // a visually balanced rainbow). 26 | // This 'spectrum' will have more green & blue 27 | // than a 'rainbow', and less yellow and orange. 28 | // 29 | // NOTE: here hue is 0-255, not just 0-191 30 | 31 | void hsv2rgb_spectrum( const struct CHSV& hsv, struct CRGB& rgb); 32 | void hsv2rgb_spectrum( const struct CHSV* phsv, struct CRGB * prgb, int numLeds); 33 | #define HUE_MAX_SPECTRUM 255 34 | 35 | 36 | // hsv2rgb_raw - convert hue, saturation, and value to RGB. 37 | // This 'spectrum' conversion will be more green & blue 38 | // than a real 'rainbow', and the hue is specified just 39 | // in the range 0-191. Together, these result in a 40 | // slightly faster conversion speed, at the expense of 41 | // color balance. 42 | // 43 | // NOTE: Hue is 0-191 only! 44 | // Saturation & value are 0-255 each. 45 | // 46 | 47 | void hsv2rgb_raw(const struct CHSV& hsv, struct CRGB & rgb); 48 | void hsv2rgb_raw(const struct CHSV* phsv, struct CRGB * prgb, int numLeds); 49 | #define HUE_MAX 191 50 | 51 | 52 | // rgb2hsv_approximate - recover _approximate_ HSV values from RGB. 53 | // 54 | // NOTE 1: This function is a long-term work in process; expect 55 | // results to change slightly over time as this function is 56 | // refined and improved. 57 | // 58 | // NOTE 2: This function is most accurate when the input is an 59 | // RGB color that came from a fully-saturated HSV color to start 60 | // with. E.g. CHSV( hue, 255, 255) -> CRGB -> CHSV will give 61 | // best results. 62 | // 63 | // NOTE 3: This function is not nearly as fast as HSV-to-RGB. 64 | // It is provided for those situations when the need for this 65 | // function cannot be avoided, or when extremely high performance 66 | // is not needed. 67 | // 68 | // NOTE 4: Why is this 'only' an "approximation"? 69 | // Not all RGB colors have HSV equivalents! For example, there 70 | // is no HSV value that will ever convert to RGB(255,255,0) using 71 | // the code provided in this library. So if you try to 72 | // convert RGB(255,255,0) 'back' to HSV, you'll necessarily get 73 | // only an approximation. Emphasis has been placed on getting 74 | // the 'hue' as close as usefully possible, but even that's a bit 75 | // of a challenge. The 8-bit HSV and 8-bit RGB color spaces 76 | // are not a "bijection". 77 | // 78 | // Nevertheless, this function does a pretty good job, particularly 79 | // at recovering the 'hue' from fully saturated RGB colors that 80 | // originally came from HSV rainbow colors. So if you start 81 | // with CHSV(hue_in,255,255), and convert that to RGB, and then 82 | // convert it back to HSV using this function, the resulting output 83 | // hue will either exactly the same, or very close (+/-1). 84 | // The more desaturated the original RGB color is, the rougher the 85 | // approximation, and the less accurate the results. 86 | // 87 | CHSV rgb2hsv_approximate( const CRGB& rgb); 88 | 89 | FASTLED_NAMESPACE_END 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /Libraries/FastLED-master/power_mgt.h: -------------------------------------------------------------------------------- 1 | #ifndef POWER_MGT_H 2 | #define POWER_MGT_H 3 | 4 | #include "FastLED.h" 5 | 6 | #include "pixeltypes.h" 7 | 8 | FASTLED_NAMESPACE_BEGIN 9 | 10 | ///@defgroup Power Power management functions 11 | /// functions used to limit the amount of power used by FastLED 12 | ///@{ 13 | 14 | // Power Control setup functions 15 | // 16 | // Example: 17 | // set_max_power_in_volts_and_milliamps( 5, 400); 18 | // 19 | 20 | /// Set the maximum power used in milliamps for a given voltage 21 | /// @deprecated - use FastLED.setMaxPowerInVoltsAndMilliamps() 22 | void set_max_power_in_volts_and_milliamps( uint8_t volts, uint32_t milliamps); 23 | /// Set the maximum power used in watts 24 | void set_max_power_in_milliwatts( uint32_t powerInmW); 25 | 26 | /// Select a ping with an led that will be flashed to indicate that power management 27 | /// is pulling down the brightness 28 | /// @deprecated - use FastLED.setMaxPowerInMilliWatts 29 | void set_max_power_indicator_LED( uint8_t pinNumber); // zero = no indicator LED 30 | 31 | 32 | // Power Control 'show' and 'delay' functions 33 | // 34 | // These are drop-in replacements for FastLED.show() and FastLED.delay() 35 | // In order to use these, you have to actually replace your calls to 36 | // FastLED.show() and FastLED.delay() with these two functions. 37 | // 38 | // Example: 39 | // // was: FastLED.show(); 40 | // // now is: 41 | // show_at_max_brightness_for_power(); 42 | // 43 | 44 | /// Similar to FastLED.show, but pre-adjusts brightness to keep below the power 45 | /// threshold. 46 | /// @deprecated this has now been moved to FastLED.show(); 47 | void show_at_max_brightness_for_power(); 48 | /// Similar to FastLED.delay, but pre-adjusts brightness to keep below the power 49 | /// threshold. 50 | /// @deprecated this has now been rolled into FastLED.delay(); 51 | void delay_at_max_brightness_for_power( uint16_t ms); 52 | 53 | 54 | // Power Control internal helper functions 55 | 56 | /// calculate_unscaled_power_mW tells you how many milliwatts the current 57 | /// LED data would draw at brightness = 255. 58 | /// 59 | uint32_t calculate_unscaled_power_mW( const CRGB* ledbuffer, uint16_t numLeds); 60 | 61 | /// calculate_max_brightness_for_power_mW tells you the highest brightness 62 | /// level you can use and still stay under the specified power budget for 63 | /// a given set of leds. It takes a pointer to an array of CRGB objects, a 64 | /// count, a 'target brightness' which is the brightness you'd ideally like 65 | /// to use, and the max power draw desired in milliwatts. The result from 66 | /// this function will be no higher than the target_brightess you supply, but may be lower. 67 | uint8_t calculate_max_brightness_for_power_mW(const CRGB* ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_mW); 68 | 69 | /// calculate_max_brightness_for_power_mW tells you the highest brightness 70 | /// level you can use and still stay under the specified power budget for 71 | /// a given set of leds. It takes a pointer to an array of CRGB objects, a 72 | /// count, a 'target brightness' which is the brightness you'd ideally like 73 | /// to use, and the max power in volts and milliamps. The result from this 74 | /// function will be no higher than the target_brightess you supply, but may be lower. 75 | uint8_t calculate_max_brightness_for_power_vmA(const CRGB* ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_V, uint32_t max_power_mA); 76 | 77 | /// calculate_max_brightness_for_power_mW tells you the highest brightness 78 | /// level you can use and still stay under the specified power budget. It 79 | /// takes a 'target brightness' which is the brightness you'd ideally like 80 | /// to use. The result from this function will be no higher than the 81 | /// target_brightess you supply, but may be lower. 82 | uint8_t calculate_max_brightness_for_power_mW( uint8_t target_brightness, uint32_t max_power_mW); 83 | 84 | FASTLED_NAMESPACE_END 85 | ///@} 86 | // POWER_MGT_H 87 | 88 | #endif 89 | --------------------------------------------------------------------------------