“It was a big whoops moment,” said Meg Medina about the real-life incident that also appears in her new novel, “Merci Suárez Changes Gears.”

Medina was a middle school teacher when it happened. Like her 11-year-old main character, Merci, she made a huge mistake on a project about ancient Egypt.

The consequences, for Merci, are surprising, awful and kind of funny — all at the same time.

Medina will be talking about her book Saturday at the National Book Festival. She’ll share childhood photos and mention things about herself that influenced the book.

Inspired by life

Two such things are Medina’s love of bike riding and her fear of a dressmaker’s dummy that reminded her of a headless ghost when she was a kid.

Medina also drew on memories of her two Cuban American grandmothers and other members of her extended family. “Everyone gave advice,” said Medina in a phone interview from her home in Richmond, Virginia. “And they were noisy!”

Merci feels that way, too. She lives in Florida with Mami, Papi and her older brother, Roli. Her grandparents — Abuela and Lolo — and her aunt and naughty twin cousins live in small houses close by.

Merci is starting sixth grade at the private school where Roli is a star student. Middle school is tough for Merci, though. Classes are hard, with lots of homework, and because she’s a scholarship student, Merci feels extra pressure to do well. Then there’s Edna Santos, a popular, rich girl who calls Merci a baby because she would rather play soccer than giggle over boys.

If only she could tell her troubles to Lolo! In the past, Merci would walk and ride her brother’s old bike with her grandfather. Talking with him always made her feel better.

But Lolo is changing. He’s often confused and forgetful. Merci has to take over some of his family responsibilities, such as watching the twins after school. For free! How will she ever be able to save enough money for the new bike she wants?

Freedom on a bike

Growing up in the Queens section of New York City, Medina was an active girl like Merci. She loved to run, play tag and roller skate as well as read and write. She loved riding her blue bike very fast.

“That was such a sense of freedom,” Medina said. “Merci yearns for that.”

Riding a bike sometimes helps Merci forget her worries about Lolo. He has a disease called Alzheimer’s (pronounced altz-hi-merz), which affects the brain and causes extreme memory loss.

The disease affects about 5.7 million older Americans, according to the Alzheimer’s Association. That means there are many grandparents who are struggling like Lolo, and many young people who worry about them, like Merci.

In her book, Medina also included grandparents who are healthy and creative, to show that everyone ages differently. Abuela, for example, is an amazing seamstress who designs and sews fantastic costumes for Merci and one of her friends.

With Merci, Medina took a break from what she called the “intense” novels she often writes for teenagers, and she tried to see the world through the eyes of an 11-year-old.

“Merci wrestles with a lot,” said Medina, “but she also likes to laugh and hang out with her friends.”

And ride her bike, which is something Medina still enjoys. Whenever she goes to the beach with her grown children, she makes sure to rent a bike, pedal around and feel the wind in her hair.

Meet the author

What: Meg Medina will speak and sign books at the Library of Congress National Book Festival.

Where: Walter E. Washington Convention Center, 801 Mount Vernon Place in Northwest Washington.

When: Saturday at 3:55 p.m. on the Children’s Green Stage.

How much: Free.

For more information: Go to loc.gov/bookfest for the complete schedule of featured authors. Visit The Washington Post area of the Expo floor, where local authors will read from their books for children throughout the day.

Win a bike: Until September 10, you have a chance to win a bike through BBGB Books, a bookstore in Richmond, Virginia. To enter, have a parent visit bbgbbooks.com/book-buzz.