Announcement

Collapse
No announcement yet.

Serial Example

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Serial Example

    Hello!
    Is there a simple serial TX-RX example?
    I have connected tx of arduino to rx of the display. And rx of arduino to tx of display with common ground.
    my sketch:

    #include "ESP8266WiFi.h"
    #include "GFX4d.h"

    GFX4d gfx = GFX4d();

    void setup() {

    Serial.begin(9600);
    gfx.begin();
    gfx.Cls();
    gfx.ScrollEnable(true);
    gfx.BacklightOn(true);
    gfx.Orientation(PORTRAIT);
    gfx.SmoothScrollSpeed(5);
    gfx.TextColor(WHITE); gfx.Font(2); gfx.TextSize(1);

    void loop(){
    if (Serial.available(){
    gfx.print(Serial.read());
    }
    }

    But nothing happens. Do you know how to solve this problem?

  • #2
    Can I connect my arduino to the 4d-upa programmer and send serial data to the iod 24 lcd via pin headers?
    I can receive data from the display but i cannot send with the adapter through the pin headers.

    Comment


    • #3
      Hello,

      Welcome to the forum,

      Ideally you should connect the IoD-09 to the Arduino with Male to female jumper cables from RX to TX and TX to RX.

      I hope this helps

      Best regards

      Paul

      Comment


      • #4
        I am using the 2.4 inch IOD. Isn't there a solution by using the pin headers of the programmer to send data to the LCD?

        Comment


        • #5
          I have experimented with this and it seems it is not possible to have the LCD receive data through the pin headers on the programming board. If you bypass it, everything works fine.

          Best regards,
          Christoffer

          Comment


          • #6
            Hello all... IoD 32T. Ok, I want to connect RS485 to the serial port. Can I connect my 75176 (485 chip) to the RX TX header pins on the red adapter board or do I need to connect directly to the flat cable? I'm wondering if the USB chip on the red board will interfere.. TIA Dan

            Comment


            • #7
              Hi,

              Ideally you should be connecting directly to the flat cable. The USB chip is connected to the RX, TX when using the UPA so there is a possibility of it affecting serial comms to another device.

              I found this after a quick google search.

              https://www.aliexpress.com/item/FPC-...B&gclsrc=aw.ds

              Best regards

              Paul

              Comment


              • #8
                Isn't the 75176 RS485 Tranceiver a 5V part?
                Are the TX and RX pins on the display 5V tolerant?

                If the 485 chip is connected directly to the flat cable, does one lose the ability to program?

                Comment


                • #9
                  Hello,

                  There is conflicting information on the 5V tolerance of the ESP8266 so it might be best to use a level shifter at least on the IoD RX pin. I have used 5V on the TX & RX and has worked perfectly well.

                  The IoD can still be programmed if the 485 ic is taken out of circuit and the 4D programmer attached to the flat cable.

                  I hope this helps

                  Best regards

                  Paul

                  Comment


                  • #10
                    Hi,

                    In a similar question, I am trying to send and receive serial data (for debugging purposes) using the Tools/Terminal in Workshop 4.
                    What code changes need to occur using the following hardware:
                    • gen4-IoD-32T
                    • 4D-UPA (using Tx and Rx)
                    I've tried with no luck to perform a simple serial comm dump using Terminal.
                    I've looked at the App notes (most use Diablo or Picaso). Since I'm using the underlying Arduino interface, is there are code frags or examples to use to accomplish this?

                    Len

                    Comment


                    • lpoma
                      lpoma commented
                      Editing a comment
                      Hi,

                      Never mind. I found the issue. Serial port debugging is now working.

                  • #11
                    Hello Len,

                    Welcome to the forum.

                    You should be able to use the terminal in Workshop and the Serial Monitor in the Arduino IDE.

                    The code in your setup needs to be.

                    Serial.begin(9600);

                    and then just use Serial.print or Serial.println

                    I hope this helps

                    Best regards

                    Paul

                    Comment


                    • lpoma
                      lpoma commented
                      Editing a comment
                      Paul,

                      Thank you. You are correct. That fixed the issue.

                      Len
                  Working...
                  X