Hi guys, i am trying to map adafruit trellis onto ableton (using hairless midi and loop midi). I am getting the error on hairless midi "FTDI drivers don't seem to be installed. Not attempting any FTDI latency tricks".
#include <Wire.h>
#include "Adafruit_Trellis.h"
#define MOMENTARY 0
#define LATCHING 1
// set the mode here
#define MODE LATCHING
Adafruit_Trellis matrix0 = Adafruit_Trellis();
Adafruit_TrellisSet trellis = Adafruit_TrellisSet(&matrix0);
#define NUMTRELLIS 1
#define numKeys (NUMTRELLIS * 16)
void setup() {
Serial.begin(9600);
Serial.println("Trellis Demo");
trellis.begin(0x70);
// put your setup code here, to run once:
for (uint8_t i=0; i<numKeys; i++) {
trellis.setLED(i);
trellis.writeDisplay();
delay(50);
}
// then turn them off
for (uint8_t i=0; i<numKeys; i++) {
trellis.clrLED(i);
trellis.writeDisplay();
delay(50);
}
}
void loop() {
delay(30); // 30ms delay is required, dont remove me!
if (MODE == LATCHING) {
// If a button was just pressed or released...
if (trellis.readSwitches()) {
// go through every button
for (uint8_t i=0; i<numKeys; i++) {
// if it was pressed...
if (trellis.justPressed(i)) {
Serial.print("v"); Serial.println(i);
Serial.println(analogRead(i));
int analogValue=(analogRead(i))/8;
Serial.println(analogValue);
midiCC(0x80, i, analogValue); //Note on, the position of the button on the trellis button pad, and the value from0-127
// Alternate the LED
if (trellis.isLED(i))
trellis.clrLED(i);
else
trellis.setLED(i);
}
}
// tell the trellis to set the LEDs we requested
trellis.writeDisplay();
}
}
}
void midiCC(byte CC_data, byte c_num, byte c_val)
{
Serial.write (CC_data);
Serial.write (c_num);
Serial.write( c_val);
}
Thank you