I have a setup I am attempting to code but if the Hardware is not designed for the usage, I may have to start from scratch.
My set up is a 12V DC power supply, which powers a L298n motor controller driving two Worm Drive DC motors.
I have opted to us a WEMOS D1 Mini powered by the 5v from the L298n. My inputs would be D1-D4 and my Outputs would be D5-D8.
D1 - D4 would be 4 Push Button Switches(INPUTS)
D5 - D8 would be 2 Motors with 2 directions (OUTPUTS) LOW and HIGH
My question is can D1 through D4 be used as switch inputs (10k Resistors attached)
And is there any prevention in using D5 - D8 for the OUTPUT signals directing the motors (HIGH, LOW) /(LOW,HIGH)?
My code calls it up as you would suspect, but without knowing the ability of the D1 Mini to handle the code
my fears are frying the chip due to the LOW or HIGH originating status's of the PINS.
Ive read several articles on using the PINS for specific tasks but when I get to the anatomy of the PINs I begin to get lost on my code. My code identifies the pins as high or low inputs on the closure of the switch but either the one motor runs continuously or the other motor does not respond.
My thought is that you cannot use 4 analog inputs on D1-D4. and I would have to use two WEMOS D1s to have my desired outcome. I have also looked at using the ESP32 but the same preset pins are causing more confusion.
Can anyone out there wade through my confusion here and point me in the right direction? Or should I just take up needlepoint.
I have attached a picture of something close to what I am trying to do. without the motors. I would simply use the led OUTPUTS in the picture with MOTORS. of course with 4 buttons.
