Hello,
I want to use the ARD SHD LCD3,5 Display on my Arduino MEGA 2560. But I need 3 PWM Pins to regulate 3 MOSFETs for 3 Pumps.
But without these PWM Pins the Display is not working.
So my questions are:
Is there a way to regulate the pumps/MOSFETS without PWM Pins?
Or
Is there a way to to avoid the PWM Pins for the display and use others?
Or
Are there other Displays I can use without PWM Pins?
Thank you very much!
I am not familiar with the display but what is it that makes you think that it needs to be controlled using PWM pins ?
The display could be controlled by digital pins, but the form factor of the screen means that when plugged in to the Mega (or Uno) the PWM pins are used
It would be possible, albeit awkward, to connect the screen to pins of your choice using jumpers and not plug it into the Mega. Modifications would be needed to the sketch and/or library to take into account that different pins were being used
These Pins (2,3) are PWM Pins. Could I change it to analog Pins or communication Pins (14,15,...,21) and would it still work? (I think digital Pins wont work).
Or I could change Pin 5 (a PWM Pin) to a normal digital Pin like 22. Because this is the Code:
I suspect, but don't know, that the only reason that the PWM pins are used is that it makes it convenient to use them on a shield designed to plug into a Uno
Why not wire the display to the Mega using jumper leads to its normal pins and get it working like that. Then you can experiment with different pin assignments to see what works when you use different pins
The pins used by the screen will be defined either in the sketch or the library and, yes, if you use different pins then the definition will need to be changed.
It would be more convenient to do that in the sketch even if they are initially defined in the library because that would avoid changing the library