Wearable monitors measure heart rate, body temperature and other health indicators. For the first time, a flexible, wearable sensor can collect data about multiple chemicals in body sweat.

The device could help people monitor conditions like dehydration and fatigue in real time, said Ali Javey, an electrical engineer at the University of California, Berkeley, and one of the inventors.

The sensor could provide an alarm, for instance, that alerts a patient to drink a glass of water or take some medication. Dr. Javey and his colleagues described their system in the journal Nature.

“Lots of studies have shown how and why sweat composition changes, but it was very difficult before to measure this on patients,” he said. “The beauty of this is that it is a comfortable and easy-to-wear system.”