Interfacing Servo and multiplexer with arduino Uno

Please tell me how can i interface 16 servo motor(MG996R) with demux(74HC154N) and arduino uno

I do not know if that can be used to drive servos.
It is trivial to drive 16 servos using Overview | Adafruit PCA9685 16-Channel Servo Driver | Adafruit Learning System

Great idea. There is also a library I have always used with this board and it is extremely useful and easy-to-use, much more so than the Adafruit library. It is in Russian so here is how to use it.

https://drive.google.com/file/d/1bOKeFY6tKQ2asMRze9EHrzt3UAv0p1tO/view?usp=sharing

Here is the zip library.

#include <iarduino_MultiServo.h>        // Includes the library
iarduino_MultiServo MSS;                //  Declares the object MSS for interfacing with the library
void setup() {
   MSS.servoSet(0, SERVO_SG90);         //  Declares Servo 0 as SG90 Servo.
   MSS.servoSet(1, SERVO_SG90);         //  Declares Servo 1 as SG90 Servo.        
   MSS.servoSet(2, SERVO_SG90);         //  Declares Servo 2 as SG90 Servo.
   MSS.servoSet(3, SERVO_MG90);        //  Declares Servo 3 as SG90 Servo.
   MSS.servoSet(4, SERVO_MG996R);    //  Declares Servo 4 as MG996R Servo.    
   MSS.servoSet(5, SERVO_FutabaS3003); // Declares Servo 5 as FutabaS3003 Servo
   MSS.servoSet(SERVO_ALL, SERVO_SG90); // Declares ALL Servos as SG90 servos.
   MSS.begin();    // Initialises the board. This command uses the DEFAULT 0x40 I2C address. It is possible to add the I2C address between the brackets.                    
}
void loop(){

   MSS.servoWrite(3, 50);   // Turns Servo 3 to 50 degrees          
   delay(1000);                       
   MSS.servoWrite(5, 120);  // Turns Servo 5 to 120 degrees  
   delay(1000);                         
   MSS.servoWrite(SERVO_ALL, 180);  // Turns ALL Servos to 180 degrees
   delay(1000);            
   MSS.servoWrite(SERVO_ALL, 0);      // Turns ALL Servos to 0 degrees.
   delay(1000);                     
}

This is one of the example sketches translated into English.

Here are all of the commands that can be used with the library:

MSS.begin(0x40); // Inits board at I2C address 0x40
MSS.servoSet(5, SERVO_SG90); // Sets pin 5 on MSS board to be an SG90 servo. However, this only works for these servos: SG90, MG90, MG996R, Futaba S3003.
MSS.servoSet(5, 180, 200, 500); // 200 and 500 are custom PWM values and 180 is the turn angle of the servo.
MSS.analogWrite(10, 4095); // Much like Arduino analogWrite - 10 is the number of the pin and 4095 is the PWM signal. NOTE on this board 4095 is the maximum, NOT 255!!!
MSS.analogRead(10); // Much like Arduino analogRead with 10 as the number of the pin. NOTE this will return values up to 4095.
// NOTE I am not sure if digitalRead exists with this library as it isn't listed in the datasheet. If not, 4095 is a HIGH and 0 is a LOW when using analogRead.
// There are a few other commands that are rather useless. I will be happy to help if any other help is needed.

Thanks for reading my post. It’s my first post so if any mods read it, please could you tell me if I’ve done something wrong?

I just checked - there is no digitalRead functionality. Just use analogRead.

Also, I am not affiliated with iArduino or trying to advertise my product - I am just an end user who likes the library