Hello, im using the 28BYJ-48 with 5 Volts power supply. I runs with an ULN2003. On the Arduino Uno it works well. But on the Arduino Mega 2560 or an ESP32 it does not work. It just makes random noise and vibrates... I have already tried multiple Pin Connections within the digital PWM 2-5 and 8-11. I also randomly tried higher pins like 40-44.
I would not expect it to work on an ESP32 because that only gives out a 3V3 signal. But I would expect it to work on the Mega if it worked in the Uno. Is the code the same? I can't see the code you posted working at all.
Are you sure the order of the pins is the same on each?
Please post a schematic and a photograph of both the Uno and the Mega systems.
As im a new user, i cant upload multiple files at once. So i uploaded them to a cloud:
shorturl.at/kqENS
Or, if this link does not work: https://we.tl/t-DEY31WGhLL