This is the project I want to do:
Equipments: Teensy 3.2, WS2812b Strip LED, 88 Key Piano.
Piano and Teensy connected PC. They are communication via PC.
This is my code, but its not working. I have no idea where I'm making mistakes.
This is my Tools Menu:
When you use Teensy you dont need to use Hairless MIDI. I know it but why my Teensy not reacting my MIDI notes I have no idea. When I run "AdaFruit strandtest" its working. Data cable, 5v and Ground cables are okay. I'm stuck. Can somebody help me?
Equipments: Teensy 3.2, WS2812b Strip LED, 88 Key Piano.
Piano and Teensy connected PC. They are communication via PC.
This is my code, but its not working. I have no idea where I'm making mistakes.
Code:
#include <Adafruit_NeoPixel.h> // Add Led Library
#define PIN 6
#define NUM_LEDS 88
#define RedDensity 150
#define GreenDensity 199
#define BlueDensity 88
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin(); // start the strip and blank it out
strip.show();
usbMIDI.setHandleNoteOn(myNoteOn);
usbMIDI.setHandleNoteOff(myNoteOff);
}
void loop() {
usbMIDI.read();
}
void myNoteOn(byte channel, byte note, byte velocity) {
strip.setPixelColor(note-21, RedDensity, GreenDensity, BlueDensity);
strip.show();
}
void myNoteOff(byte channel, byte note, byte velocity) {
strip.setPixelColor(note-21, 0, 0, 0);
strip.show();
}
This is my Tools Menu:
When you use Teensy you dont need to use Hairless MIDI. I know it but why my Teensy not reacting my MIDI notes I have no idea. When I run "AdaFruit strandtest" its working. Data cable, 5v and Ground cables are okay. I'm stuck. Can somebody help me?