MKR 1010 Wifi Transistor 3V+ 5V

@AdPMel, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.

Please edit your post, select all code and click the </> button to apply so-called code tags and next save your post. It makes it easier to read, easier to copy and prevents the forum software from incorrect interpretation of the code.

Probably not the cause of the problem but your schematic is missing a resistor between pin 12 and the base of the transistor. You're also missing a flyback diode over the motor.