Writing text on OLED I2C

Good day

I am a newbie and am battling to write text on my display my code is below all the text is ok but when the mode has to be displayed as below it does not work
display.print("MODE:");
display.print(m);

Here is my complete code attached

hope someone can assist as I say I am not a programmer I learn as I go :o :o :o

Regards

sland_hok.ino (5.13 KB)

When you have a small-ish sketch, it is better to copy-paste into a Code Window.
If it is a large sketch or multiple tabs, attach the INO or ZIP.

You have mixed types:

...
int m = 1;
...
    m = ("Normal")

...
    m = ("Breeding");
...

and the "Normal" statement is missing a semi-colon

So I suspect that your program will not even compile. If you don't understand an error message, copy-paste to your message.

David.

I saw that after I posted thanks fixed it and it does compile now but still have the problem with the words Normal and breeding not displaying on the display it shows as 358 and 363 respectively and I have an few scribbles at the bottom left corner of my display

Hi Dave
Thanks for your interest so far I do have these errors showing up if when I compile
Thank for the help so far

C:\Users\sbk261f\Documents\Arduino\sland_hok\sland_hok.ino:83:18: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]

m = ("Normal");

^

C:\Users\sbk261f\Documents\Arduino\sland_hok\sland_hok.ino:92:20: warning: invalid conversion from 'const char*' to 'int' [-fpermissive]

m = ("Breeding");

^

The only way that weird assignment is going.to work is if m is a String.

Well you defined m as an integer number;

int m = 1;

So the complier will complain when you try to allocate a string to it ....................

m = ("Breeding");

Thanks everybody I changed the code a bit as below and got it sorted now I'm still stuck with the funny characters at the bottom right corner of the display.
Any ideas how to fix that

......
if (newMode == HIGH) {
display.print("Normal");
}
else {
display.print("Breeding");
}
......

Cut your sketch down until they disappear.