You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have one question..
how to use constructor in other included files c, when i like to use function u8g2?
in main.ino i use:
U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=/ 15, / dc=/ 4, / reset=/ 5); //dc=/ 4 -> dc=*/ 4
and any function in this file work fine, but when i like to use any function in other c file, i got e.g
display.cpp:75:1: error: 'u8g2' was not declared in this scope..
Only then i add in function constructor again, it works.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i have one question..
how to use constructor in other included files c, when i like to use function u8g2?
in main.ino i use:
U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=/ 15, / dc=/ 4, / reset=/ 5); //dc=/ 4 -> dc=*/ 4
and any function in this file work fine, but when i like to use any function in other c file, i got e.g
display.cpp:75:1: error: 'u8g2' was not declared in this scope..
Only then i add in function constructor again, it works.
Beta Was this translation helpful? Give feedback.
All reactions