Silly question - Selection of the process

I'm sorry everyone. I know nothing about the program for arduino.

I wish someone could teach me how to write the following program for arduino.

Aims: Ask the user to input a letter A or B, the arduino board then execute the corresponding function of program A of B.

for instance: A is the Blink and B is the Ping function.

OK, your turn to make it do something more meaningful

void setup() 
{
  Serial.begin(115200);
  Serial.println("Start ");
}

void loop() 
{
  if (Serial.available())
  {
    int c = Serial.read();
    if (c == 'A')
    {
      A();
    }
    if (c == 'B') 
    {
      B();
    }
  }
}


void A()
{
  Serial.println("you pressed A");
}

void B()
{
  Serial.println("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB");
}

There are many example programs that come with the Arduino IDE.

This demo shows simple ways to receive and interpret data from the Serial monitor.

This Thread illustrates how to plan and implement a program.

If you just want someone else to write the program you should ask in the Gigs and Collaboration section of the forum

...R

Thank you so much, ;) robtillaart and Robin2