Police visited the home of Martin Gregory, 50, of Albert Street, Hucknall, on another matter but found him to be in possession of the drug.
Admitting possession at Mansfield Magistrates’ Court, his solicitor James Whyley said a previous fixed penalty notice for having the drug was the likely reason this case was brought before the court.
He added: “He suffers from severe arthritis and had used cannabis in the past to numb the pain.”
He was handed a 12-month conditional discharge and made to pay £20 costs.
The magistrates warned him: “We have a degree of sympathy with your case, and you should communicate with your GP regarding any pain relief that you need.
“The taking of cannabis is not recommended at all or you will end up in court again.”