logo elektroda
logo elektroda
X
logo elektroda

Wemos + OLED 0.66 + RFM69: How to change the DIO0-IRQ pin?

pier 1452 18
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18644023
    pier
    Level 24  
    Welcome.

    I want to make a gateway on a Wemos board + a dedicated 0.66 oled display.
    The problem is that the RFM69 radio occupies one pin of the I2C bus for me.
    The question is how to change this pin to another pin in the program or library. Specifically, the pin in question is the RFM's DIO0-IRQ pin.
    I have tried several ways but either the radio doesn't work or the ESP doesn't start.


    Code: C / C++
    Log in, to see the code
    .

    Program don't comment I know it's a mess, for now it's just testing. The program itself works fine.
  • ADVERTISEMENT
  • Helpful post
    #2 18644353
    Anonymous
    Level 1  
  • #3 18644527
    pier
    Level 24  
    khoam wrote:
    pier wrote:
    Problem is that the RFM69 radio occupies one pin of the I2C bus for me. The question is how in the program or library to change this pin to another.
    .
    On the ESP8266 this is relatively simple:
    Code: C / C++
    Log in, to see the code
    The default pins for I2C are D2 (SDA) and D1 (SCL). I don't see in the code that you use Wire anywhere. However, in:
    Code: C / C++
    Log in, to see the code
    you are already using the default pin for SDA.
    .

    Khoam a bit off the mark.
    I wrote that I would like to use Wemos and a dedicated Oled. I don't have the ability to physically change the pins for the display and they have to be D1 D2 pins.
    The problem is that I have the IRQ pin of the radio hanging on one of these pins. I can't change this pin to another pin because either the radio doesn't work or the esp doesn't start.
  • #4 18644798
    Anonymous
    Level 1  
  • #5 18645108
    pier
    Level 24  
    I have tried every free one.
    Wemos is a D1 MINI:
    Wemos + OLED 0.66 + RFM69: How to change the DIO0-IRQ pin? .
    And the display:
    Wemos + OLED 0.66 + RFM69: How to change the DIO0-IRQ pin? .
    I'm probably typing the new pin wrong or in the wrong place.

    From what I understand I am changing in this line:
    Code: C / C++
    Log in, to see the code
    .

    And in the RFM69.h file this line:
    Code: C / C++
    Log in, to see the code
    .

    Am I thinking right?
  • #6 18645179
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #7 18645323
    pier
    Level 24  
    Khoam D7 is, after all, the MOSI pin of the radio.
    The pins I can use are D0, D3 or D4.

    I don't know what you mean by the OLED schematic.
  • ADVERTISEMENT
  • #8 18645344
    Anonymous
    Level 1  
  • #9 18645420
    pier
    Level 24  
    Well, now I know why all this was not working out for me.
    So it's not possible to connect the Wemos with this display and radio to make them work?
    Is there any way to make the display and radio share a common pin?
  • ADVERTISEMENT
  • #10 18645499
    Anonymous
    Level 1  
  • #11 18645856
    pier
    Level 24  
    Khoam I got a bit caught up with this IRQ pin and forgot that you can still combine with the NSS pin of the radio.
    How do you think maybe this pin is suitable for connection under D3 or D4?
  • #12 18645866
    Anonymous
    Level 1  
  • #13 18645972
    pier
    Level 24  
    And the IRQ can be plugged into D8?
  • #14 18645989
    Anonymous
    Level 1  
  • #15 18646084
    pier
    Level 24  
    Success.
    I swapped the IRQ and NSS pins of the radio and then NSS flipped to D3 and it worked.

    Khoam would you help me with one more?

    Why is the compiler throwing an error in this case:
    Wemos + OLED 0.66 + RFM69: How to change the DIO0-IRQ pin? .

    As if it doesn't see the "Blink" function. If I give "Blink" somewhere in front then the compiler doesn't see the problem but the diode doesn't glow.
    I have an almost identical program running and in it the compiler does not see the problem.
  • #16 18646109
    Anonymous
    Level 1  
  • #17 18646127
    pier
    Level 24  
    I placed void Blink(byte PIN, int DELAY_MS); at the beginning.
    The error has disappeared but the led does not blink when receiving data.
  • #18 18646149
    Anonymous
    Level 1  
  • #19 18646169
    pier
    Level 24  
    Thanks to Khoam, everything is now working.

Topic summary

The discussion revolves around configuring a Wemos D1 Mini board with a 0.66 OLED display and an RFM69 radio module, specifically addressing the issue of the DIO0-IRQ pin occupying a necessary I2C bus pin. The user seeks to change the IRQ pin to another GPIO without causing the ESP8266 to fail to start. Various suggestions are made, including using different GPIO pins (D3, D4, D0) and the possibility of using an inverter to manage the IRQ pin state. Ultimately, the user successfully swaps the IRQ and NSS pins, allowing the system to function correctly. Additional troubleshooting is provided for a separate issue regarding a "Blink" function in the code.
Summary generated by the language model.
ADVERTISEMENT