-
Notifications
You must be signed in to change notification settings - Fork 270
Closed
Description
Hi,
I'm trying to use sendPitchBend to send a float number, but I got a error with that function. It says that "Toto" is not a member of "midi::DefaultSettings". I have searched the library and couldn't find that variable anywhere. Is it a problem with my code or a bug in the library ?
My code
#include <MIDI.h>
#include <Wire.h>
#include <SparkFun_MMA8452Q.h>
float ym;
float n;
MIDI_CREATE_DEFAULT_INSTANCE();
MMA8452Q accel;
void setup() {
// put your setup code here, to run once:
Serial.begin(57600);
accel.init(SCALE_8G, ODR_200);
MIDI.begin();
}
void loop() {
// put your main code here, to run repeatedly:
for(n = 0; n<30;n++)
{
accel.read();
ym = ym + accel.cy;
}
ym = ym/n;
if(MIDI.read())
{
MIDI.sendPitchBend(ym,1);
}
}