The Raspberry Pi does not have analog ports. So you use Pulse Width Modulation.
You want a 1.6V signal on a Raspberry Pi 3.3V GPIO. It would be approximately, 50% duty cycle or 3.3V * 50% = 1.65V. You can setup an instance like
GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.OUT) pi_pwm = GPIO.PWM(11,100) # 100 Hz = 10 ms pi_pwm.start(50) # duty cycle of 50% pi_pwm.ChangeDutyCycle(100) # duty cycle changed to 100% pi.pwm.ChangeFrequency(1000) # change frequency to 1000 Hz or 1 ms pi.pwm.stop() # to stop it GPIO.cleanup() # to remove the code from the pi or cleanup.
classgpiozero.
PWMLED
(pin, *, active_high=True, initial_value=0, frequency=100, pin_factory=None)[source]
from gpiozero import PWMLED from time import sleep led = PWMLED(24) while True: led.value = 0 # off sleep(1) led.value = 0.5 # half brightness sleep(1) led.value = 1 # full brightness sleep(1)