A cannabis farmer followed step-by-step instructions on video-sharing website YouTube to learn how to grow the drug.
Thomas Sheehy converted two bedrooms in his three-bedroomed home to cultivate cannabis, Newcastle Crown Court heard last Thursday.
The 49-year-old was caught after police searched the house, in Hawthorn Road in Ashington, in March, prosecutor Neil Pallister said.
Officers found 32 mature plants and 17 small to medium-sized plants in the bedrooms, which had blacked out windows, with the larger plants having the potential to produce 1.2kg of cannabis.
Sheehy was not present during the search, but went to the police station voluntarily that evening and was arrested.
Mr Pallister said: “He stated that he had been growing them for about three months.
“He explained that he learned how to irrigate and set up lighting from YouTube.
“He said ‘at every stage I got to, I looked on YouTube’.”
Sheehy had pleaded guilty to producing Class B drugs before at an earlier hearing before South East Northumberland Magistrates’ Court in Bedlington.
Andrew Rutter, defending, said his client suffers from anxiety and depression and that he was self-medicating with cannabis, which he was growing for his own use.
Judge James Goss, the Recorder of Newcastle, said he was not prepared to sentence Sheehy until medical evidence of his mental health problems could be produced.
The case was adjourned for three weeks, until June 20.