Deep sleep with periodic wake up requires 2 things.
1) A hardware connection between GPIO16 and reset. As you are using a ESP-01 that is problematic as the access to GPIO pins is very limited. This is one reason why I don't use ESP-01 modules.
2) Software that triggers deep sleep for a period of time. That is pretty straightforward as it just needs a call to ESP.deepSleep(t); where t is duration of sleep in microseconds.
Check out
https://www.instructables.com/id/Enable ... SP8266-01/ for the mod necessary to deep sleep on this module. Personally I would switch to either a NodeMCU / Wemos if you want easy development, or ESP-12F modules to keep size down.
20 seconds may be a bit short for the deep sleep if you want to minimise heating effects, as it will probably spend about 3 seconds taking and reporting the measurement. 40 seconds and up may be better.
You also don't need the code to make repetitive measurements. It should be wake up, take and report measurement, go into deep sleep for required period.