Chat freely about anything...

User avatar
By eriksl
#80877 Here you go:
https://github.com/eriksl/esp8266-unive ... ses/tag/19
This release adds

- compiler upgraded from gcc 4.8.5 to gcc 7.4.0 (experimental!)
- various options to reduce code size (IRAM) (experimental!)
- toolchain now included in the project, so if you want to build yourself, you only need: gcc, make, git and esptool.py; all the rest will be built from the project if you run "make"; no need for any SDKs or toolchains.
- flags to select polarity of the TX/RX pins of both uarts:
* uart0-tx-inv
* uart0-rx-inv
* uart1-tx-inv
use flag-set to enable or flag-unset to disable inversion, then write config, then reset.
User avatar
By eriksl
#80878
holopaul wrote:when you have some time please tell me a bit about the oscillating pwm function for the LEDs.


The magic is in extra parameters to the "im A B pwm" command. If you specify three extra integer numbers, they will be interpreted as "minimum value", "maximum value" and "speed". The speed is something you will have to experiment with, usually something between 1000 and 20000 is interesting.

To start / stop the oscillating, use "io-trigger" or short "it". Something like "it A B start". You can also use here:
- start
- stop
- off (shut it off completely, pwm duty = 0)
- on (go back to the last selected pwm duty)
- toggle
- none

Using the combination of triggers and "oscillating" pwm's, you can program some inputs to directly control the pwm value of some outputs. Just don't "start" it and use "up" and "down" triggers. I am using it to control/dim my lighting from rotary encoders.

There are some per-pin flags to control the behaviour (use isf A B flag):
- repeat (don't stop after one cycle)
- autostart (after boot)
- pullup
- reset-on-read (for counters)
- and these for ledpixels: extended / grb / linear / fill8

For most of these, use config-write and then reset to activate.
User avatar
By holopaul
#81139 Works wonderful ! i will post a video if anybody is interested.
Please tell me if i can send same command to different ledpins with "ism" command? so i can preset some led animation without sending individual led commands.

Also , i can't figure out pwm and pwm2. i use four gpio pins to control two motors. With all four gpio set as "pwm2" i get nothing. With only two as "pwm2" i get both motos running when i send a "iw 0 4 255" to only one of the pins.
I use gpio 4,5,12,14 on the esp. Are there other "pwm2" capable pins? My "pwm width" is set to 8 bit.

"primary pwm" is working as it should but it has such a low refresh rate. Not ideal for motors.

thanks
User avatar
By holopaul
#81153 Meanwhile i stumbled upon a bug. I use the bridge to get sensor data. And if i listen with a terminal to the bridge port (23) and send to the command port (24) commands like "l" log or "?" help , the bridge freezes. I have to hard reset in order to get it working again, "r" command it's not doing the trick.
Sometimes it freezes on the first command sometimes i have to send multiple commands but the result is the same.
I tried different bauds 57600 to 250000, no change.
Can you confirm this find?
Thanks