The Opportunity Rover's final transmission to NASA from Mars was a bare-bones data dump indicating it was low on power as a storm approached.
The Opportunity Rover didn't actually send the words "My battery is low and it's getting dark"; this was a poetic translation of the rover's more technical transmission.
On 13 February 2019, NASA announced that the mission of a robotic rover named Opportunity had come to an end after the device had spent 15 years exploring the surface of Mars:
One of the most successful and enduring feats of interplanetary exploration, NASA’s Opportunity rover mission is at an end after almost 15 years exploring the surface of Mars and helping lay the groundwork for NASA’s return to the Red Planet.
The Opportunity rover stopped communicating with Earth when a severe Mars-wide dust storm blanketed its location in June 2018. After more than a thousand commands to restore contact, engineers in the Space Flight Operations Facility at NASA’s Jet Propulsion Laboratory (JPL) made their last attempt to revive Opportunity, to no avail. The solar-powered rover’s final communication was received June 10.
As the online world mourned the loss of the famous Martian explorer, many social media users started sharing a quote that supposedly constituted Oppy’s final transmission to NASA: “My battery is low and it’s getting dark.” This quote quickly made its way around the Internet, shared by celebrities, reporters, and social media influencers. Some people also created tributes to Opportunity that featured the rover’s alleged final transmission:
Although many individuals and news outlets cited these words as if they constituted a verbatim reproduction of Opportunity’s final transmission, the phrase was not a literal reproduction of the robotic rover’s last statement.
The quote originated with a Twitter thread about Oppy’s demise by posted by KPCC science reporter Jacob Margolis. At one point, Margolis said the rover’s final transmission “basically” translated as “my battery is low and it’s getting dark”:
This quote quickly escaped the context of Margolis’ Twitter thread, however, and started to circulate as if he were relaying a verbatim message from the Mars rover. On 16 February 2019, Margolis published an article on The LAist website explaining how his words came to be taken out of context:
My tweet is an interpretation of what two scientists from the Mars Exploration Rover Mission told me.
Deputy Project Scientist Abigail Fraeman spoke about what it was like when they realized the June  dust storm was going to be particularly bad, and that Oppy’s life was in danger. They told it to conserve energy.
“It’s hard, because you know [the storm’s] coming … but there’s nothing you can do to stop it,” Fraeman said.
“By Thursday, we knew that it was bad. And then by Friday, we knew it was really bad, but there was nothing we could do but watch. And then it was Sunday, we actually got a communication from the rover and we were shocked,” she said. “It basically said we had no power left, and that was the last time we heard from it.”
John Callas, the project manager, offered another poignant detail about the final communication with Oppy: “It also told us the skies were incredibly dark, to the point where no sunlight gets through. It’s night time during the day.”
“We were hopeful that the rover could ride it out. That the rover would hunker down, and then when the storm cleared, the rover would charge back up,” he said. “That didn’t happen. At least it didn’t tell us that it happened. So, we don’t know.”
When NASA announced the completion of Opportunity’s mission in February 2019, the Mars rover hadn’t communicated with the space agency since the previous June. The solar-powered Opportunity was low on power when one of the largest dust storms observed on Mars engulfed the planet and, essentially, turned “day into night,” as the Planetary Society wrote:
On June 20th, NASA announced the storm had gone global. To be more accurate, it evolved into a planetary-encircling dust event (PEDE), lofting enough dust into the atmosphere to completely blanket the planet and block out the Sun. In other words, the Red Planet and most all its features were hidden from most orbiting instruments beneath an opaque, beige dust cloud. The atmospheric scientists taking measurements with instruments on the orbiters were soon blocked out.
Oppy sent its final message from the surface of Mars on 10 June 2018:
Opportunity downlinked what would turn out to be her final message from Mars on June 10, 2018. The bare bones contents of that missive informed her crew that a monster dust storm was lifting dust all around Endeavour Crater and was turning day into night there. Minutes later, the solar-powered robot field geologist presumably shut down and went into a kind of hibernation mode to wait out the storm.
NASA attempted to communicate with Opportunity many times after the storm passed, but the rover never responded: