use third pin on version 01 & how to use pwm
Posted: Tue Mar 17, 2015 5:25 pm
I am currently working on a small project where I want to controll an rgb led stripe via the ESP8266. I only have a version 01 here at the moment which only has 2 "normal" output pins (I need 3). I found this library though (https://github.com/eadf/esp8266_stdout) which should not use the rx pin. But now how do I use that free pin inside my program? Whats the pin number? I can control the other two pins like this:
Also output_set only gives me high or low states, I do need pwm. Sadly I found very little information online for that. What I got so far is this:
What exactly are these channels? Are channels equal to pin numbers? Also which file do I have to include to use these functions? When I used pwm.h my compiler complained that it can't find such a file (although its part of the sdk).
Some help here would be awesome!
Code: Select all
which sets pin 0 to low. The same doesn't work for the rx pin, or I at least can't figure out the pin number I have to use. Which one is it?gpio_init();
GPIO_OUTPUT_SET(0, 0);
Also output_set only gives me high or low states, I do need pwm. Sadly I found very little information online for that. What I got so far is this:
Code: Select all
uint8_t* duty = 2;
pwm_init( 1000, &duty); // frequency , duty
pwm_start();
...
// change duty if needed
pwm_set_duty(&duty, 0); // duty, channel??
pwm_start();
What exactly are these channels? Are channels equal to pin numbers? Also which file do I have to include to use these functions? When I used pwm.h my compiler complained that it can't find such a file (although its part of the sdk).
Some help here would be awesome!