Help with Error Teensy40 // Midi Controller

Hey,
I´m using a Teensy40 and I want to build a midi controller using this code:

int controlChange       = 176;
int potiPin[]           = {A0,A1,A1,A3};
int controllerNummer[]  = {20,21,22,23};
int controllerWert[]    = {0,0,0,0};
int controllerWertAlt[] = {0,0,0,0};
int potiWert[]          = {0,0,0,0};


int i = 0;

void Setup(){
  Serial.begin(9600);
  
}

void loop(){
  for (i = 0; i < 3; i++) {
    potiWert[i]  = analogRead(potiPin[i]);
    controllerWert[i] = map(potiWert[i],0,1023,0,127);

    if (controllerWert[i] != controllerWertAlt[i]) {

      Serial.write(controlChange) ;
      Serial.write(controllerNummer[i]);
      Serial.write(controllerWert[i]);

      controllerWertAlt[i] = controllerWert[i];
    }
    
  }
}

Still I´m getting this Error:
c:/users/lenovo/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\Lenovo\AppData\Local\Temp\arduino\sketches\EE3798F2C5634DE1B4F6AB0BA4357C3C/....\cores\teensy_avr_teensy40_usb_serial,speed_600,opt_o2std,keys_en-us_5fa0a990ad051d6a9f36b09e7262dd2a\core.a(main.cpp.o): in function main': C:\Users\Lenovo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\cores\teensy4/main.cpp:51: undefined reference to setup'
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

My code seems to be right, I have no Idea what this error means, anyone can help?

Try setup.....

Wow.... Thanks

The first thing makiing a person blind is the eye we say here. It happens everone now and then.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.