No announcement yet.

One Wire (GOLDELOX)<--->NodeMCU ESP12

  • Filter
  • Time
  • Show
Clear All
new posts

  • One Wire (GOLDELOX)<--->NodeMCU ESP12


    I am trying to communicate uOLED-160-G2 with the NodeMCU ESP12 which is a developemt kit with WiFi connectivity. I would like to change the image of the display remotely using the WiFi connection. I just have the pins IO1 and IO2 free to stablish the communication with NodeMCU. I only need to send one byte to uOLED for changing the image. For instance, if the device receives 0x31, then Goldelox will display the picture number 1. I am sure my code is wrong but I am not expert and don't know where is the mistake.
    Could you send me an example different from the temperature sensor?
    Do you know a better way to change the images on the uOLED-160-G2 using IO1 or IO2?

    Thank you.

    My test code is like this:

    var stat_buf;
    func main()
    pin_Set(ONEWIRE, 1); // set either I/O pin to 1 wire mode

    /*while(!media_Init()) // initialize the SD Card
    putstr("Drive not mounted...");

    txt_Set(TEXT_COLOUR, BLACK );
    gfx_RectangleFilled(0, 0, 128, 160, YELLOW);

    //OW_Reset(); // optional
    //OW_Write(0xAC); // optional read status

    stat_buf := OW_Read(); // optional 82 when DS1821 run

    txt_MoveCursor(4, 0);
    print ("stat_buf=0x", [HEX2] stat_buf );



  • #2
    I think you want to receive serial from the ESP12, so it should be connected to the COM port and set up accordingly.

    If you were to use one of the GPIO pins on the ESP12 (I think it has some) and connect it to one of the I/O pins on the display, then you could switch between two images that way, but you'd need the appropriate code on the ESP12


    • #3
      Hi Mark,

      I know that the easiest way to communicate ESP12 and GOLDELOX is using the UART. I have already done some tests using the serial port and works perfectly. However, I need to left these pins unconnected because I want these pins free for programming.

      My aim is to control 4 displays using one WiFi module. If I use the serial port, I would have to connect the TX pin of ESP12 to the RX pin of the four Goldelox processors and I think that it is no a good idea. I want to use the IO1 and IO2 of Goldelox for receivingh orders from ESP-12 that will change the image of the display. For that reason I was thinking in using the One Wire Protocol.
      Furthermore, the One Wire library already exist for ESP-12 and it is easy to use.

      Is the code that I posted in the previous message right?


      • #4
        OK, well, I guess then that would be a decent way to do it.

        I am not aware of any demo other that the temp sensor one.

        Hopefully you will be able to adapt that and get it to work.

        You have used 1 rather than IO2 in the pin_Set() code, using a predefined constant is better as there is less chance of mistake assuming that 1 is IO1 (since it is actually IO2)

        Perhaps try doing a reset and checking that you get a response before proceeding to more complicated stuff?

        Sorry, I can't provide much more info.