Control two motors with Bolt IoT hardware

I am trying to control two motors using bolt. In that case, I am using L298N motor driver, Bolt IoT module mainly. My code is in Python.
My question is-
How to connect three motor driver with to Bolt IoT board with 9v battery?
I connected as-
Driver
Positive(1)----->5V
GND------------->5V(GND) & Bolt board GND
Positive(2)------>Bolt board 5V
But still the motor is not rotating.

My code -

from boltiot import Bolt
api_key = "(not shown here)"
device_id = "(not shown here)"
mybolt = Bolt(api_key, device_id)

while True:
    print("Write On or Off")
    i = int(input("Type 1 = MOVE FORWARD\n2 = MOVE BACKWARD\n3 = MOVE LEFT\n4 MOVE RIGHT"))
    if i==1: #forward
        response = mybolt.analogWrite('A0', '255')
        response = mybolt.digitalWrite('1', "LOW")
        response = mybolt.digitalWrite('2', "HIGH")
        response = mybolt.digitalWrite('3', "LOW")
        response = mybolt.digitalWrite('4', "HIGH")
        print(response)
    elif i==2: #backward
        response = mybolt.analogWrite('A0', '255')
        response = mybolt.digitalWrite('1', "HIGH")
        response = mybolt.digitalWrite('2', "LOW")
        response = mybolt.digitalWrite('3', "HIGH")
        response = mybolt.digitalWrite('4', "LOW")
    elif i==3: #left
        response = mybolt.analogWrite('A0', '255')
        response = mybolt.digitalWrite('1', "HIGH")
        response = mybolt.digitalWrite('2', "LOW")
        response = mybolt.digitalWrite('3', "LOW")
        response = mybolt.digitalWrite('4', "HIGH")
    elif i==4: #right
        response = mybolt.analogWrite('A0', '255')
        response = mybolt.digitalWrite('1', "LOW")
        response = mybolt.digitalWrite('2', "HIGH")
        response = mybolt.digitalWrite('3', "HIGH")
        response = mybolt.digitalWrite('4', "LOW")

How to connect PWM pin with Bolt board with digitalMultiWrite?
Provide the code please.

Please help me.

@chowdhurydipankar110

Replace ‘A0’ pin with any of the GPIO pins, for example pin 0. And you should be good to go.

A0 pin is an ADC pin, so it is only used to receive (INPUT) Analog signals. You can use any of the GPIO pins to transmit (OUTPUT) Analog signal using the AnalogWrite command.

PWM pin cannot be used with a digitalMultiWrite as the function itself sends either a HIGH or LOW signal indefinitely. You have to use the analogWrite command/API to send a PWM pulse originated from the Bolt module directly, where the width of the pulse varies with time, leading to sending a pulse as analog OUTPUT.

If there is anything else you meant to say, please define the problem you are facing.

How to connect three motor driver with to Bolt IoT board with 9v battery?

Hi @chowdhurydipankar110,
In case you want to connect 3 motor drivers, you may connect an Arduino to your Bolt using the UART interface and connect the motor drivers to the Arduino. Do refer the Bolt Arduino Library docs and UART commands docs. Do let me know if you need any other help.