Notifications
Clear all

Arduino IDE and ESP3866

6 Posts
3 Users
4 Likes
640 Views
(@sj_h1)
Estimable Member
Joined: 3 years ago
Posts: 179
Topic starter  

I have seen in some of the tutorials, a number of functions available on the ESP8266 that I can't find any documentation on. One such function was ledcAnalogWrite(), however there are more. Where can I find this information.

 


   
Quote
Will
 Will
(@will)
Famed Member
Joined: 2 years ago
Posts: 2547
 

@sj_h1

ledcAnalogWrite does not exist as a documented function.

It is a user-defined subroutine in the sample code in the documentation you were (presumably) reading at ...

https://espressif-docs.readthedocs-hosted.com/projects/arduino-esp32/en/latest/api/ledc.html

I had a psychic girlfriend but she left me before we met.


   
ron bentley reacted
ReplyQuote
(@sj_h1)
Estimable Member
Joined: 3 years ago
Posts: 179
Topic starter  

@will Thanks! Are there anymore of the jewels?

 


   
ReplyQuote
Will
 Will
(@will)
Famed Member
Joined: 2 years ago
Posts: 2547
 
Posted by: @sj_h1

@will Thanks! Are there anymore of the jewels?

No idea, I don't use ESPs, just Google.

I had a psychic girlfriend but she left me before we met.


   
Inq reacted
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5900
 

sj_h1 @will ledcWrite is a valid call, not Analog. See randomnerds, I use it to control the led brightnes, I think it uses PWM. You also need ledcSetup and ledcAttachPin to establish PWM frequencies and duty cycles.

https://randomnerdtutorials.com/esp32-pwm-arduino-ide/

 

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ron bentley reacted
ReplyQuote
Will
 Will
(@will)
Famed Member
Joined: 2 years ago
Posts: 2547
 

@zander 

I know. The specific sub he asked about "ledcAnalogWrite" does not exist.

It is, however, created in the sample software appearing within the ESP documentation on the URL that I specified. The confusion is the OP not recognizing that the sub was NOT part of the official set of software provided.

I had a psychic girlfriend but she left me before we met.


   
ron bentley reacted
ReplyQuote