Ramps 1.4 and REpRapDiscount Full Graphic Controller

Hi,

I would like to use the controller's potentiometer. But I tried all the pins but couldn't recover the slightest movement. In button or AnalogRead mode, nothing.

Do you have a sample code or did I miss something? :confused:

On the other hand, I can write well on the screen, so the connection is ok.

Thank you in advance.

The only potentiometer on the board is the LCD contrast control.

If you mean the control on the red circle, it is not a potentiometer. It is a rotary encoder.

The encoder A pin is connected to EXP2 plug pin 5, the encoder B pin is connected to EXP2 plug pin 3 and the switch is connected to EXP1 pin 2.

full discount control.jpg

Note: The encoder board used in the examples has pullup resistors installed. The display board does not have those resistors so the internal pullups need to be enabled on the A and B inputs. Change the example code as shown below.

void setup()
       {	
	// Set encoder pins as inputs and enable the internal pullups
	pinMode(CLK,INPUT_PULLUP);  // enable internal pullup on pin A
	pinMode(DT,INPUT_PULLUP);  // enable internal pullup on pin B
	pinMode(SW, INPUT_PULLUP);  // // enable internal pullup on switch pin

full discount control.jpg

Oh great, thank you very much. I was far from the answer.

Thank you very much.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.