proyectos:talleres:ets
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaÚltima revisiónAmbos lados, revisión siguiente | ||
proyectos:talleres:ets [2023/10/01 23:19] – [Info del Micrófono] brolin | proyectos:talleres:ets [2023/10/03 13:48] – [Ejemplo básico] elmago116 | ||
---|---|---|---|
Línea 5: | Línea 5: | ||
{{: | {{: | ||
{{: | {{: | ||
+ | |||
Línea 58: | Línea 59: | ||
===== ESP 8266 ===== | ===== ESP 8266 ===== | ||
- | https:// | ||
- | |||
{{: | {{: | ||
===== Micrófono ===== | ===== Micrófono ===== | ||
- | ==== Info del Micrófono ==== | ||
- | https:// | ||
- | |||
{{: | {{: | ||
Línea 73: | Línea 69: | ||
===== Matriz de leds ===== | ===== Matriz de leds ===== | ||
- | https:// | + | {{: |
Línea 100: | Línea 96: | ||
<file c++ ejemplo.ino> | <file c++ ejemplo.ino> | ||
+ | // Configurar - sujeto | ||
#include < | #include < | ||
#define LED_PIN D3 | #define LED_PIN D3 | ||
Línea 109: | Línea 105: | ||
#define rojo CRGB::Red | #define rojo CRGB::Red | ||
#define azul CRGB::Blue | #define azul CRGB::Blue | ||
- | # | + | # |
- | #define maplv2 0x00AA00 | + | |
- | #define maplv3 0xFFFF00 | + | |
- | #define maplv4 0xFFE994 | + | |
- | #define maplv5 0xFFAA00 | + | |
- | #define maplv6 0xEC9BA4 | + | |
- | #define maplv7 0xE1AA00 | + | |
- | #define maplv8 0xFF00FF | + | |
- | #define maplv9 0x00DAFE | + | |
- | #define maplv10 0x0181FE | + | |
const uint8_t matrixWidth | const uint8_t matrixWidth | ||
Línea 130: | Línea 117: | ||
const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz) | const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz) | ||
unsigned int sample; | unsigned int sample; | ||
- | |||
- | void setup() { | ||
- | Serial.begin(115200); | ||
- | LEDS.addLeds< | ||
- | FastLED.setBrightness(BRIGHTNESS); | ||
- | } | ||
#define ESCENAS 1 | #define ESCENAS 1 | ||
Línea 150: | Línea 131: | ||
}, | }, | ||
}; | }; | ||
- | + | ||
+ | void setup() { | ||
+ | Serial.begin(115200); | ||
+ | LEDS.addLeds< | ||
+ | FastLED.setBrightness(BRIGHTNESS); | ||
+ | } | ||
+ | |||
+ | // Ejecutar en loop - predicado | ||
void loop() { | void loop() { | ||
+ | // Pintar la matriz de leds | ||
for(int i = 0; i< matrixHeight; | for(int i = 0; i< matrixHeight; | ||
for(int j = 0; j< matrixWidth; | for(int j = 0; j< matrixWidth; | ||
Línea 157: | Línea 146: | ||
} | } | ||
} | } | ||
+ | | ||
unsigned long startMillis = millis(); | unsigned long startMillis = millis(); | ||
unsigned int peakToPeak = 0; | unsigned int peakToPeak = 0; | ||
Línea 191: | Línea 181: | ||
FIXME | FIXME | ||
+ | |||
==== Librería para escribir en la matriz ==== | ==== Librería para escribir en la matriz ==== | ||
FIXME | FIXME |
proyectos/talleres/ets.txt · Última modificación: 2023/10/03 13:50 por elmago116