Most analog outputs for Arduino and ESP32 are digital outputs pulsed by pwm.
ESP32 has 2 real 8 bit analog outputs providing analog voltage levels.
Function calls for Arduino IDE does not seem to differ between true analog and pwm.
In B4R my code for ESP32 does not run. Output stays low all the time:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
What´s going wrong?
			
			ESP32 has 2 real 8 bit analog outputs providing analog voltage levels.
Function calls for Arduino IDE does not seem to differ between true analog and pwm.
In B4R my code for ESP32 does not run. Output stays low all the time:
			
				B4X:
			
		
		
		Sub Process_Globals
    Public Serial1 As Serial
    Private astream As AsyncStreams
    Private pinG25analog As Pin   
End Sub
Private Sub AppStart
    Serial1.Initialize(115200) ' (256000)
    Log("AppStart")
    astream.Initialize(Serial1.Stream, "Astream_NewData", "Astream_Error")
    pinG25analog.Initialize(25, pinG25analog.MODE_OUTPUT)
    'pinG26analog.Initialize(26, pinG26analog.MODE_OUTPUT)
    pinG25analog.AnalogWrite(250) ' 3.2V
    pinG25analog.AnalogWrite(120) ' 1.5V
    pinG25analog.AnalogWrite(50)  ' 0.6V
   
End SubWhat´s going wrong?
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
				 
 
		 
 
		