Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the base of the signal output #14

Open
lightsun1323 opened this issue Oct 12, 2023 · 7 comments
Open

Changing the base of the signal output #14

lightsun1323 opened this issue Oct 12, 2023 · 7 comments

Comments

@lightsun1323
Copy link

lightsun1323 commented Oct 12, 2023

I am using esp8266-07 and after uploading the RX pin project, it is the output pin
I want to make changes so that the TX pin is the DMX output pin
I changed the LED pin according to what I want, but I did not find the DMX output pin
Is such a thing possible or not?

@robertoostenveld
Copy link
Owner

I am not really sure what you mean with "base", it is not a term that I am familiar with in relation to this microcontroller or the arduino environment.

There are two modes of operation, either it uses the serial UART1 through Serial1 (when ENABLE_UART is defined, see line 37), or it uses I2S which is the sound interface (when ENABLE_I2S is defined, see line 46).

See http://arduino.esp8266.com/Arduino/versions/2.3.0/doc/reference.html#serial for documentation on the serial interface.

If you don't want to use UART1, I suggest you use the I2S interface. That is explained here.

I should add that I have implemented this for a Wemos D1 mini board and only tested that and a NodeMCU module. The ESP-07 is a more bare module that seems to have fewer pins exposed. The sketch may need changes to accommodate
that.

@lightsun1323
Copy link
Author

Forgive me for my wrong translation
By the base, I mean the pin
I defined all the pins for esp07 and the project is running well
The only problem I have is that the RX pin is recognized as an output on I2S, and no matter what I did, I could not change it to the TX pin.

Regards
Sami

@robertoostenveld
Copy link
Owner

There is no dedicated pin for I2S (see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/i2s.html), but in my sketch it is set to pin GPIO 3, which is indeed Rx.

See
https://github.com/robertoostenveld/esp8266_artnet_dmx512/blob/57212159923df2f84f8e9a81104d06b9ad493831/esp8266_artnet_dmx512.ino#L94C18-L94C18

As far as I know, you can change it to whatever you like and hence use another pin for I2S.

@robertoostenveld
Copy link
Owner

On https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/ there is a section that discusses what the best pins are for certain purposes. You could check there to see which of your ESP-07 pins are still available and are the best suited for output without interfering with other functions.

@lightsun1323
Copy link
Author

I looked at the links you sent
And by changing the number of the pin, nothing happens inside the output and only the RX pin gives the DMX output, even with the number changed
I erase esp07 flash memory with python for each test
I even tested it on the NodeMCU board, but nothing happens by changing the pin and compiling, and even by putting a different number (1, 2, 3, ...), only the RX pin outputs.

1 similar comment
@lightsun1323
Copy link
Author

I looked at the links you sent
And by changing the number of the pin, nothing happens inside the output and only the RX pin gives the DMX output, even with the number changed
I erase esp07 flash memory with python for each test
I even tested it on the NodeMCU board, but nothing happens by changing the pin and compiling, and even by putting a different number (1, 2, 3, ...), only the RX pin outputs.

@robertoostenveld
Copy link
Owner

I am not sure how you are testing this, do you have a DMX light fixture attached to the ESP, or are you looking with an oscilloscope? "Nothing happens" (as you write) can be because of a lot of different reasons when you change something, for example because nothing happened to start with.

I recommend that you make a very simple schematic like a blink sketch and implement that with the different ways of outputting a PWM series of pulses (which is similar to what the DMX protocol does) and look at that with an LED over a resistor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants