TAMPA, Fla. (WFLA) — A Florida teacher is facing charges after he allegedly admitted to hiding a video camera in his school’s bathroom in a suicide note last week, authorities said.

The Collier County Sheriff’s Office said music teacher Diego Alberto Rojas-Pulido, 37, attempted suicide after he was questioned about a video recording device found at a bathroom in Pinecrest Elementary School in Immokalee.

Three female students discovered the device hidden inside a tissue box and notified Rojas-Pulido. He took the device, but did not report the incident. One of the students ended up telling a school counselor about it, authorities said.

The same day, Rojas-Pulido was escorted off campus by the school’s principal and assistant principal and told to report to the school district’s main office in Naples. He handed over a small part of a headset, but the students said it was not the same device they saw, the arrest report said.

When interviewed by detectives, Rojas-Pulido denied owning the device or putting it in the bathroom. He said he thought it was a broken headphone. He planned on reporting the incident the next day, he told deputies, according to the arrest report.

The report notes Rojas-Pulido was sweating, burping and smoking out of his vape, which he does when he’s nervous.

He agreed to take a polygraph test, but did not show up to his appointment. He later told deputies he was spending time with his family and would need to reschedule.

The day before his appointment, authorities said Rojas-Pulido tried to kill himself by stabbing himself in the neck with a knife. He was taken to a Lee County Hospital, and is expected to survive.

The sheriff’s office said investigators found a flash drive on top of his safe with notes addressed to the sheriff’s office and his family.

“I admit my guilt of having placed a recording device in a bathroom. No one else did it but me. I have ordered these devices and always chickened out, and this time I was caught,” the note addressed to the sheriff’s office said, according to the report.

Rojas-Pulido faces a charge of video voyeurism (offender 24 or older and victim under 16), a second-degree felony.

He remains at the Lee County Hospital as of noon Wednesday.