Using constant instead of serial.read()

Hi UKHeliBob,

I tried it like this:

int val = analogRead(A2);
  
  if(val>1000)
  //if (Serial.available() > 0)
  {
    //char input = Serial.read();

    char input = {'A'};
    
    if (input != '\r') // not a carriage return
    {
      sendbuffer[sendlength] = input;
      sendlength++;
    }

I press a button and want to send an A.

I also tried Robin2´s idea to. If I use an char it does work. But if I use an int it is working a bit :wink:
For "Hello World" it´s just sending [He].

Edit: With a long I can get 4 characters :wink: