generate voltage in arduino

Hi there, i am trying to run a arduino code to generate 3.3 volts and 1.64 volts. I have used analogwrite to generate the voltages. From my understanding, 255 pwm is equal to 5v. With this understanding, I am able to generate 3.3 volts which is around 155 pwm. The problem here is I can not get 1.64 volts by using this method. Anyone can help me on that ?

I have upload my code below. Thanks in advance.

Drone_arduino_myself.ino (2.07 KB)

The PWM is always 5V, it's only the duty cycle that changes. Aka, analogWrite() is a terrible name because it does NOT output an analog voltage.

Depending on what you want to do with the voltages you can convert it to a true analog voltage but for that we need more details.

What is the purpose of generating those particular voltages?

The Arduino PWM outputs cannot be used to power devices.