So, I was making a clock with a 20x4 i2c LCD, keypad, and ds3231 and I found out that the 20x4 is too bright to sleep with so I thought of dimming the display instead of turning it off, and I also want to make the time visible too so please help me out!
Edit: The jumper on the i2c backpack is shorted out even without the jumper, and I don't want to unsolder and scratch the trace on the back of the backpack, So that doesn't work.
Well, the transistor is probably held in the on state by the jumper. So you would be applying PWM to a short circuit, do nothing except maybe damage the Arduino.
Do you have a DMM? Check the resistance of each jumper pin to ground... also to VCC. Then you can obtain an idea of whether you can apply test signals and what those signals should be.
No need, we know the board - this board is by far the most common "backpack" available at the present moment.
Not practical, as it is controlled by the PCF8574.
OK, with the jumper in place, you can switch the backlight on or off. If you solder a 4k7 resistor between pins 1 and 16 of the backpack , you will have either fully on or dim. Alter the 4k7 value to get the correct sort of "dim".
If you only wanted to choose between dim and off, you would just put the resistor in place of the jumper.
Alright this getting confusing, so i could turn on and off the backlight with software but I cant dim it with a value, so I thout of using pwm to control it, like turn on and off a led really fast
OK, well I have given you the solution. There is no need to have the backlight intensity continuously variable; you jest set your "dim" brightness with the resistor.