Martha MigliacioAlex Wong
Published © GPL3+

Using The Pmod CLS With Arduino Uno

Application notes for Pmod CLS and Arduino Uno. In this app, the message sent from the serial monitor will be displayed on the Pmod LCD.

BeginnerShowcase (no instructions)1 hour2,401
Using The Pmod CLS With Arduino Uno

Things used in this project

Story

Read more

Schematics

Pmod CLS and Arduino Uno Fritzing file

Fritzing file displaying the connection of the Pmod CLS to the Arduino Uno.

Pmod CLS and Arduino Uno Fritzing Image

Fritzing image displaying the connection between the Pmod CLS and Arduino Uno.

Code

Pmod CLS and Arduino Uno Code

Arduino
Using this code will send a message from the Arduino Uno serial monitor to be displayed on the Pmod CLS LCD.
/************************************************************************
*
* Test of the Pmod module
*
*************************************************************************
* Description: Pmod_CLS
* message sent from serial monitor will be show on LCD display.
*
* Material
* 1. Arduino Uno
* 2. Pmod CLS (Jumpers on positions MOD0 and MOD2)
* See instructions list on https://reference.digilentinc.com/pmod/pmod/cls/user_guide
*
************************************************************************/

//Declaration of a serial port
#include <SoftwareSerial.h>
SoftwareSerial lcd(2,3); // RX, TX

char machaine[40];
int i=0;

void setup()
{
Serial.begin(9600); // initialization of serial communication of the moniteur
lcd.begin(9600); // initialisation of serial communication of the display
lcd.write("\x1b[j"); // Erase display
lcd.write("\x1b[0h"); // configuration of the display (write on 2 lines)
lcd.write("\x1b[0;5H"); // cursor is on line 1 and columm 5
lcd.print("Entrer");
lcd.write("\x1b[1;1H"); // cursor is on line 2 and columm 1e
lcd.print("votre message");
delay(2000);
lcd.write("\x1b[j"); // Erase display
lcd.write("\x1b[0;1H"); // cursor is on line 1 and columm 1
lcd.print("sur le moniteur");
lcd.write("\x1b[1;5H"); // cursor is on line 2 and columm 5
lcd.print("serie");
}

void loop()
{
while (Serial.available()) // As long as caracters are on serial communication
   {
   machaine[i]=Serial.read(); // Store caracters in table machaine
   Serial.print(machaine[i]); // Write caractères in serial monitor
   delay(10);
   if (i==0) // If first caracter
      {
      lcd.write("\x1b[j"); // Erase display
      lcd.print(machaine[i]); // Send caracter on display
      }
   else
     {
     lcd.print(machaine[i]);
     }
   i++;
   }
i=0; // Initialisation for next message
}

Credits

Martha Migliacio

Martha Migliacio

5 projects • 18 followers
Alex Wong

Alex Wong

14 projects • 53 followers
I work in Digilent and like creating projects
Thanks to Lextronics.

Comments