OLED/NANO ISSUES..!

Dear all,

Happy to be a part of this community.
Playing around with arduino for the past couple of hours and getting some issues you may advice.

I want to input ttl signal to my nano and display it (the raw string of data (ASCII)) on my OLED screen.
I have no issues with the OLED dislay drivers, as U8GLIB worked very well for me.
i can input the signal to the arduino and read it on my laptop in the serial monitor.
But i dont understand how to make the data show on the screen.
Any suggestions?

The code i used so far is

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // RX, TX

#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE|U8G_I2C_OPT_DEV_0);

void setup() {
// Open serial communications and wait for port to open:
Serial.begin(4800);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// initialize the serial communications:
Serial.begin(9600);
}

void loop() {
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

Your problem seems to me that you don't know what your current code is doing. Try to explain it to us.

Once you have written it down for us, you will probably realise what you have to do to achieve what you want and don't even have to post the explanation :smiley:

I want to input ttl signal to my nano and display it (the raw string of data (ASCII)) on my OLED screen.

Is ttl a serial signal at ttl level? Is this where your mySerial comes in?

Hi,

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(4800);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // initialize the serial communications:
  Serial.begin(9600);
}

TWO void setup(), I don't think so... should all be ONE void setup()

Shouldn't one of those Serial.begin be mySerial.begin
And in your void loop()
which Serial.read and Serial.available are you referring to.
mySerial.read mySerial.available when you refer to mySerial port....

Tom... :slight_smile: