I used the flashgamer OledMarlin.zip and extracted that into my arduino Library. Then, I simply ran the Marlin arduino file which naturally created an additional 'Marlin' folder with an arduino filed named "Marlin." Then, I simply compiled that file, uploaded, and it produced the above picture.
It feels like I still have no idea what I'm doing .
I added your myOLED code below "Serial.println(" *C"); and Arduino software gave the following error:
'myOLED' was not declared in this scope
I'm sure everyone is face palming because I did not define what "myOLED" was doing above, but did I mention I'm a total n00b trying to get this to work?
The "myOLED" was just an example. That is the object for the OLED display.
I was assuming that you had a normal library and a sketch to start with.
I'm not sure if you can make this into a working project, you may have to buy a common display after all.
But then again, you have come this far, perhaps you might spent/waste more time to make it work.
Only a few files from that *.zip file are needed. I can't help to strip it down for the OLED only, since I don't have that OLED to test it. I think only 3 or 5 files are needed.
In the file oled_1311.h the object is created.
OLedI2C lcd;
That means that a object 'lcd' is created which is the OLedI2C class.
I think he called it 'lcd' to be compatible with the existing code, which was originally for a LCD display.
From then on, you can use 'lcd' to write to the OLED.
Try this:
Serial.print("Temperature ");
Serial.print (steinhart);
Serial.println(" *C");
lcd.setCursor(0,0); // column, row. 0,0 is upper left
lcd.print("Temperature ");
lcd.print(steinhart):
lcd.print(" *C");