Sainsmart Nano TX/RX with uLCD-32-PTU-AR

My project uses a Sainsmart Nano 3.0, reading a Dallas serial addressed temperature sensor and displays the temp data on a uLCD-32-PTU-AR. While this same code and hardware works flawlessly with my arduino Nano, the temperature data will not show up on my LCD.

Using the serial monitor on my computer, I can verify that my sensor is working correctly, however the LCD using visi-genie LED digits still reads all zeros.

Am I wrong to assume a Nano can TX/RX with this screen? I use a 4D systems LCD shield on my Uno, but I connect the LCD to my Nano through direct wiring on the 5v, tx, rx, gnd and rst pins. I can post my full code + 4D workshop project if necessary...

Post your code.

Am I wrong to assume a Nano can TX/RX with this screen?

Let's think about that for a minute...

While this same code and hardware works flawlessly with my arduino Nano

Does that answer your question?

If not, we need to see "this same code" and to have a better explanation of the problem.

Naturally, I can deduce on my own that it’s obviously not working on the Nano 3.0… my question there was, do I have to use a shield for TX/RX communication to work correctly?

Here is my Arduino code… Before you ask, yes, I have checked baud rates of the screen and the arduino to make sure they are the same. Am I missing something obvious here? Maybe I just need a fresh set of eyes on this code

#define CHANNEL1 8 
#define CHANNEL2 9 

#include <genieArduino.h>

#include <OneWire.h>
#include <DallasTemperature.h>

#define ONE_WIRE_BUS 2 //DALLAS serial sensors go into input 3
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);
DeviceAddress coolant = { 0x28, 0x12, 0x31, 0x66, 0x04, 0x00, 0x00, 0x65 };

int slider0_val;//Set point for fan
int slider1_val;//Set point for fan 2 
int humidity, t, temp;

void setup()
{
  pinMode(CHANNEL1, OUTPUT); //Low Speed Fan RELAY
  pinMode(CHANNEL2, OUTPUT); //High Speed Fan RELAY

  sensors.begin(); // DALLAS sensors begin reading
  sensors.setResolution(coolant, 10);
  
  genieBegin (GENIE_SERIAL, 56000);  //Serial0 for 4D Display
  
  genieAttachEventHandler(myGenieEventHandler);

  //Reset the Display (change D4 to D2 if you have original 4D Arduino Adaptor)
  pinMode(4, OUTPUT);  // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
  digitalWrite(4, 1);  // Reset the Display via D4
  delay(100);
  digitalWrite(4, 0);  // unReset the Display via D4

  delay (3500); //let the display start up
}


void loop()
{
  static long waitPeriod = millis();

  genieDoEvents(); // Do this every loop, checks the input buffer for data from the display and runs myGenieEventHandler()

  //Read from sensor every 100ms and write to the display
  if (millis() >= waitPeriod)
  {
    temp = (t * 1.8) + 32; //Convert *C to *F.
    
    float inside = sensors.getTempF(coolant);
    float tempF;
    
    sensors.requestTemperatures();    
    //tempF = sensors.getTempF(inside);
    Serial.println (inside);////////GOOOD CODE 
    
    genieWriteObject(GENIE_OBJ_LED_DIGITS, 0, inside);//HOME SCREEN TEMP..................FORM 0
    genieWriteObject(GENIE_OBJ_ANGULAR_METER, 0, inside);//HOME SCREEN TEMP GAUGE.......FORM 0 
    genieWriteObject(GENIE_OBJ_LED_DIGITS, 1, inside);//RELAY 1 CONTROL.............FORM 1
    genieWriteObject(GENIE_OBJ_LED_DIGITS, 7, inside); //RELAY 2 CONTROL...........FORM 5
 
    waitPeriod = millis() + 10; // rerun this code in another 100ms time.
 
  if (slider0_val > inside)//RADIATOR FAN SLIDER SET POINT WITH DALLAS SENSOR...For some reason it's  responding in polar opposites of the command? 
  {
    digitalWrite(CHANNEL1, HIGH); //RADIATOR FAN
  }
  else
  {
    digitalWrite(CHANNEL1, LOW); //RADIATOR FAN
  }
 /////////////////////////////////////////////////////
  
  if (slider1_val > inside)
  {
    digitalWrite(CHANNEL2, HIGH);
  }
  else
  {
    digitalWrite(CHANNEL2, LOW);
  }
 
 
 
  }
 
}

void myGenieEventHandler(void)
{
  genieFrame Event;
  genieDequeueEvent(&Event);

  //If the cmd received is from a Reported Event
  if (Event.reportObject.cmd == GENIE_REPORT_EVENT)
  {
    if (Event.reportObject.object == GENIE_OBJ_SLIDER)            // If the Reported Message was from a Slider
    {
      if (Event.reportObject.index == 0)                          // If Slider0
      {
        slider0_val = genieGetEventData(&Event);                  // Receive the event data from the Slider0
      }
    }
  }

 //If the cmd received is from a Reported Event
  if (Event.reportObject.cmd == GENIE_REPORT_EVENT)
  {
    if (Event.reportObject.object == GENIE_OBJ_SLIDER)            // If the Reported Message was from a Slider
    {
      if (Event.reportObject.index == 1)                          // If Slider1
      {
        slider1_val = genieGetEventData(&Event);                  // Receive the event data from the Slider1
      }
    }
  }
//////////////////////////////////////////////////////////////////////////////////////////////

/* //If the cmd received is from a Reported Event
  if (Event.reportObject.cmd == GENIE_REPORT_EVENT)
  {
    if (Event.reportObject.object == GENIE_OBJ_WINBUTTON)            // If the Reported Message was from a Slider
    {
      if (Event.reportObject.index == 11)                          // If button 11
      {
        genie.WriteContrast(0);                  // Receive the event data from the button11
      }
    else 
    {
      genie.WriteContrast(1);
    }
  }
  }

  //If the cmd received is from a Reported Object, which occurs if a Read Object is requested in the main code, reply processed here.
  if (Event.reportObject.cmd == GENIE_REPORT_OBJ)
  {
  }
}

my question there was, do I have to use a shield for TX/RX communication to work correctly?

In general, no. A shield simply makes using a device foolproof. After all, they only fit one way.

But, my question is TX/RX communication between what and what? What is, and what is not, properly communicating with what?

my problem = temperature data will not display on my LCD widgets.
Process of elimination...

  1. The temp data displays correctly when using almost the exact same code, but on an Uno or MEGA with a shield for the LCD to connect to the board.
  2. Nano is definitely reading the sensor correctly, because I can watch it update continuously on the serial monitor.
  3. There must be a break in communication somewhere between the Nano and my LCD.
  4. I'm guessing it has something to do with either an incorrect line of code (typo?) that is specific to using the Nano, or the TX/RX wiring to the LCD is incorrect somehow, hence why it works with a shield, but not straight wiring?

This is one of those times when I feel like I just don't know what it is that I don't know... :roll_eyes:

PROBLEM SOLVED...
The Nano's circuit wiring for the TX and RX pins were switched on the board itself. Wonder how that happened??

Is it a clone ?
Clones often have pcb layouts that differ in some subtle ways from the genuine arduino pinout
What did you use for a pinout reference ?