Alright, sorry for the confusion, but heres where im sort of stuck. As of right now, im going along with the u8g2 library. Ive gotten my code better organized as mentioned above, converting the file to an xbm, placing it where it seems it should be in the code, then using the draw function to call it, im just confused as to whether the draw function replaces setup or main, or what should go in thise places. Additionally, I would prefer to place the image in a separate tab, as i have two other images id also like to display in this program. My code is as follows, Thanks!
#include <Arduino.h>
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
const long screenInterval = 1000; // interval at which to buffer (milliseconds)
unsigned long sensorInterval;
unsigned long previousMillis;
// Copy the contents of your .xbm file below
#define eyesstraight_width 65
#define eyesstraight_height 64
static unsigned char eyesstraight_bits[] = {
0x6f, 0xff, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x7f, 0x01, 0x5f, 0xff, 0x00,
0x00, 0x00, 0x00, 0xae, 0x7f, 0x01, 0xb7, 0x7f, 0x00, 0x00, 0x00, 0x00,
0xb6, 0xff, 0x00, 0xaf, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x6e, 0xbf, 0x01,
0xb7, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x7f, 0x01, 0xfe, 0xed, 0x00,
0x00, 0x00, 0x00, 0xfe, 0xed, 0x01, 0xfd, 0xdb, 0x00, 0x00, 0x00, 0x00,
0xfe, 0xdb, 0x01, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xea, 0x01,
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x01, 0xfd, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfa, 0x01, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xea, 0x01, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x01,
0xaf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x01, 0xaf, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7e, 0x01, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7e, 0x01, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x6f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xde, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xbf, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xd7, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0xdb, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xea, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xdb, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xfe, 0xed, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0xdb, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0xd5, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xdf, 0x7f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x57, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x7f, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x01, 0xdf, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7e, 0x01, 0xb7, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xfe, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x01,
0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x01, 0xfe, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xea, 0x01, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xd6, 0x01, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x01,
0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0xd6, 0x01, 0xfd, 0xff, 0x00,
0x00, 0x00, 0x00, 0xfe, 0xf5, 0x01, 0xfb, 0xeb, 0x00, 0x00, 0x00, 0x00,
0xfe, 0xeb, 0x01, 0x6f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x76, 0x7f, 0x01,
0xdf, 0x7e, 0x00, 0x00, 0x00, 0x00, 0xae, 0xbf, 0x01, 0xaf, 0xff, 0x00,
0x00, 0x00, 0x00, 0xaa, 0x7f, 0x01, 0xb7, 0x7e, 0x00, 0x00, 0x00, 0x00,
0xde, 0x7f, 0x01, 0xaf, 0xff, 0x00, 0x00, 0x00, 0x00, 0x56, 0x7f, 0x01 };
void draw(void) {
// graphic commands to redraw the complete screen should be placed here
u8g2.drawXBM( 0, 0, eyesstraight_width, eyesstraight_height, eyesstraight_bits);
}
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Also, what my program will ultimately do is display a bitmap of an eye facing left, right, or center based on where an object is relative to sensor readings, hence the premature millis.