Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: homerjay on June 05, 2017, 11:40:27 PM

Title: NHD-0420CW-AB3-ND Display variables
Post by: homerjay on June 05, 2017, 11:40:27 PM
Hello,

I'm trying to display some sensor variables along with some static text for the labels. Something like this...
Code: [Select]
Temperature        xx.xC
Humidity           xx.x%

For reference my sensor is a DHT11.

My controller is an arduino UNO connected to the display via SPI and so far I've only been able to modify the code found here (https://www.newhavendisplay.com/NHD_forum/index.php?topic=914.0) to simply change the text and include the DHT11 sensor. I am having a hard time understanding how I send data to the display. I'm a beginner with the arduino so I am only familiar with the standard LCD library commands, such as LCD.print, LCD.setcursor, etc. none of which work here it would seem. The way that this display gets its data is kind of foreign to me. If someone could perhaps show some example code for writing a variable or perhaps point me in the right direction for some reading on how to accomplish this that would be awesome.

Thank you so much for your time,
Homerjay

P.S. did anyone else experience artifacts followed by eventual freezing with this display when connected via I2C using the I2C example code?