I have 9 sensors connected to my Arduino Mega.
Can I connect the GND lines of each sensor to a single Arduino GND pin? As Arduino has several GNDs I don't know if I can only connect one per pin.
I have two motors that I will use with 9V and I will connect them to the 12V input of the L298N.
My question is regarding the GND of the L298N. Is it connected only to the battery or should I also connect it to the arduino? I ask because I see several images, in one it is connected and in another it is not.