Simon Wassell, aged 33, was spotted using his mobile phone to try and snap the children.
Police later found nearly 600 images of unidentified women on his phones, Plymouth Crown Court heard.
A judge told Wassell that his behaviour was ‘perverse’.
But Judge Ian Lawrie spared Wassell jail, saying that sexual offender treatment would help tackle his demons.
Wassell from Whitchurch, admitted two counts of attempting to take indecent photographs of a child on August 31, 2015.
He also pleaded guilty to two counts of voyeurism, or observing someone doing a private act for sexual gratification.
Wassell also admitted possession of an image of extreme pornography, por-traying a woman having or simulating sex with a dog.
Hollie Gilbery, for the Crown Prosecution Service, said the two 13-year-old friends were getting changed in separate cubicles at Tavistock’s Meadowlands Swimming Pool at about 12.30pm.
She added that one girl looked up and saw a phone being held above the cubicle and angling down towards her.
Miss Gilbery said the girls reported what had happened to reception and staff allowed them to change in another cubicle as they stood guard.
She added that Wassell was identified and arrested at the pool.
The court heard police found two deleted images of one of the girls, one taken from below and one from above. She was covered with a towel.
Officers also discovered 14 images of adult women in states of undress and totally naked, who appear to be oblivious to the camera.
Miss Gilbery said police found 581 photographs showing parts of women’s bodies, some of them taken in public.
Jason Beal, for Wassell, said that his client could be suffering from Asperger’s Syndrome.
He added the defendant had ‘difficulties of social interaction’ but had managed to hold down a job in a factory.
The court heard Wassell had ‘not attended a mainstream school’.
Judge Lawrie told the defendant: ‘You appear to be oblivious to the pain and upset you cause by this perverse behaviour.
‘Ultimately you need help and you need help to confront your demons.’
Wassell was handed a three-year com-munity order with a sex offender treatment course and 15 sessions of intensive probation supervision.
He must pay £340 prosecution costs and £85 victim surcharge.
Wassell will sign the Sex Offender Register for five years.