External power supply Arduino

I’m using a Arduino Yun supplied with 9V from a battery. How do I start logging? → So that is without usage of a pc.

Thanks in advance

Write code to sample and store.

Or you grab an axe and start hitting a tree with it. (but that is guilty of being off-topic :oops: )