I purchased two 6V hobby motors and am trying to power them using my photon. I need to be able to turn them on and off, via analog or digital pads. I have tried a few methods, using H-Bridge to take 9V (from a battery) and convert it to 5 and use that method. I also have tried a few transistors , a 2N2222, and a few others. I followed a few schematics, including https://www.hackster.io/adi1690/particle-photon-motor-control-c1fa6d but I do not have that exact transistor and I could not get it to work.
Can someone help me with this? I am open to using 2AA to power motor separately, or a 9V.