Expected primary-expression before "." token

Hola! Sigo con mi proyecto de máquina expendedora y mi método de pago es el código QR. Programando se detectó el error de expected primary-expression before "." token.
Busqué en el foro otros errores similares y sus resoluciones, pero no me sirvieron para esto, supongo que hay algo demás en el código pero no logro detectar qué es.

Linea con error:

} while (u8g.nextPage ()); // Una llamada a este procedimiento marca el final del cuerpo del bucle de imagen.

Código completo:

#include <U8glib.h> // incluida la biblioteca U8glib
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define u8g
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

// 'bebida qr', 128x64px
const unsigned char myBitmap [] PROGMEM = {
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
  0xc0, 0x00, 0x3e, 0x00, 0x19, 0xf0, 0x1c, 0xcf, 0x80, 0x00, 0x7c, 0xf8, 0x33, 0xfc, 0x00, 0x03, 
  0xc7, 0xff, 0x19, 0xf0, 0x07, 0xff, 0x83, 0xc6, 0x7f, 0xff, 0x80, 0xe0, 0xc0, 0xf8, 0xff, 0xe3, 
  0xc7, 0xff, 0x1f, 0xe0, 0x05, 0xec, 0x07, 0x81, 0x9f, 0x80, 0x07, 0x06, 0x3c, 0x78, 0xff, 0xe3, 
  0xc6, 0x03, 0x1e, 0x00, 0x18, 0x80, 0x1f, 0x01, 0x8f, 0x00, 0x0f, 0x3f, 0x3c, 0x78, 0xc0, 0x63, 
  0xc6, 0x03, 0x18, 0x03, 0x18, 0x01, 0x9f, 0xfe, 0x63, 0x3f, 0xf0, 0xff, 0xc3, 0x98, 0xc0, 0x63, 
  0xc6, 0x03, 0x1e, 0x30, 0x18, 0xfe, 0x7c, 0x00, 0x03, 0x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0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};

void setup() {
   u8g.drawBitmapP (0, 0, 16, 64, resumen de circuito);

}

void loop() {
 u8g.firstPage (); // Una llamada a este procedimiento, marca el comienzo del bucle de imagen.
  do {
    write();
  } while (u8g.nextPage ()); // Una llamada a este procedimiento marca el final del cuerpo del bucle de imagen.
  // reconstruir la imagen después de un retraso
  delay (1000);
}

}

Hola
El último paréntesis es redundante

write();

creo que debería ser

u8g.write();

Y como dice @b707 sobra la llave "}" final

Hice los arreglos que dijeron, pero sigue detectando error en la segunda línea.

   u8g.write();
  while u8g.nextPage (); // Una llamada a este procedimiento marca el final del cuerpo del bucle de imagen.

¿Por qué quitaste los paréntesis después while?
¿Conoces la sintaxis del С?

Realmente no se de programación, me baso en ejemplos y correcciones que hacen en el foro.

No puedes hacerlo de esta manera. Debe comprender la sintaxis: ahorrará mucho tiempo

¿Conseguiste arreglar el código?

Por el momento no, estoy buscando mas información sobre este tipo de error para comprender lo que está mal.

probar eso:

while (u8g.nextPage ());

La sintaxis está mal.
El de arduino, como todo lenguaje, tiene sus reglas.
while(), if(), for(), llevan paréntesis y dentro de éstos los parámetros.

Por favor, intenta aportar información.
Los errores que te indica el IDE siempre te dan la idea de que esta mal, mas allá que esten en inglés, es fácil entenderlos, sepas o no programación.
Si no entiendes, un par de horas mirando explicaciones por Youtube de Arduino te servirá de mucho.
Ahora del mismo modo que posteaste el código, si tienes errores postea los mismos.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.