Announcement

Collapse
No announcement yet.

GEN4-IOD-24T serial comm issue with Arduino Mega

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

  • GEN4-IOD-24T serial comm issue with Arduino Mega

    Hi,

    I asked some help about serial communication.

    I built a system with gen4-iod-24t and arduino mega.

    These two communicating via tx/rx.

    The phenomenon is that in the very beginning of the code the mega send a code to the display and for this event the display turned out to showing full bright.

    I have monitoring the serial communication with serial terminal at arduino side and it somes this thing what I am quite not understand. i tried to lokk after this code but without success.

    These are the caracters: VMDPV_1|1��MDPV
    Every serial transition somes with this.

    I attached both code. This is the Arduino sise.

    #include <SD.h>
    #include <Adafruit_MAX31865.h>
    #include <SPI.h>


    /*
    Name: Huto_homero
    Version: v1
    Created: 2021. 01. 13. 9:23:34
    Author: Hanák Péter
    */

    #define rnominal 100.0 //PT100
    #define RREF 430.0 // reference resistance
    #define reset 2
    #define hibaLED 3
    #define temperature1 101
    #define temperature2 102
    #define temperature3 103
    #define temperature4 104
    #define Displaystart 105

    // soros port hibakódok
    #define SerialErr 1
    #define SDErr 2
    #define SDReady 3

    Adafruit_MAX31865 thermo1 = Adafruit_MAX31865(10,11,12,13); //CS,DI,DO,CLK
    Adafruit_MAX31865 thermo2 = Adafruit_MAX31865(9,11,12,13); //CS,DI,DO,CLK
    Adafruit_MAX31865 thermo3 = Adafruit_MAX31865(8,11,12,13); //CS,DI,DO,CLK
    Adafruit_MAX31865 thermo4 = Adafruit_MAX31865(7,11,12,13); //CS,DI,DO,CLK

    int temp1, temp2, temp3, temp4, tempTmp;
    boolean mSE= 1, mSD= 1;
    unsigned long timer;
    String tempValue="";
    FILE logFile;

    void setup()
    {
    Serial.begin(115200);

    pinMode(reset,OUTPUT);
    pinMode(hibaLED,OUTPUT);

    // SD card init
    timer= millis() + 3000;
    while (1)
    {
    if(SD.begin(6))
    {
    Serial.print(SDReady);
    Serial.flush();
    mSD= 0;
    break;
    }
    if(timer > millis())
    {
    Serial.print(SDErr);
    Serial.flush();
    mSD= 1;
    break;
    }
    delay(1000);
    }

    Thx for your help.

    Peter
    Attached Files

  • #2
    I have found the reason why the display was white. The 2560 keeps the display in reset state however I did not pull down the reset line directly.
    I do only this "pinMode(reset,OUTPUT);".

    Sorry,

    Comment

    Working...
    X