A drug dealer was caught by the texts left on his mobile phone after police found just a few grams of cannabis when they raided his home.

Officers armed with a warrant went to John Spooner's Trowbridge home in July last year and seized a number of items relating to the drugs trade.

But they found less than half an ounce of herbal cannabis, which a judge at Swindon Crown Court was told on Friday 'In the great scheme, is not very much'.

Hannah Squire, prosecuting, said there was also a set of scales but detectives took the 26-year-old's mobile phone for analysis.

When he was first questioned he denied ever being involved in supplying drugs saying the scales were to ensure he wasn't getting ripped off.

However, after it was examined by an expert his phone was found to be littered with texts relating to the trade in cannabis.

She said many referred to 'cheese' which is street slang for a type of skunk while another asked for him to get him some after work.

Spooner, of Ashmead, Trowbridge, pleaded guilty to being concerned in the supply of cannabis between May 6 and July 17 last year and simple possession of the drugs.

Alex Daymond, defending, said "This is a man who accepts he has a chronic cannabis habit. For a while he has been selling cannabis to fund his habit.

"There is no suggestion he has been living a luxurious lifestyle, it is a depressingly familiar picture. He has resorted to selling it to people he knows.

"He started smoking it at 17 and has only had a year where he was not using since then. He says he has not smoked since his arrest.

"He is now registered as a full time carer for his mother who is disabled with arthritis."

Judge Tim Mousley QC imposed a six-month jail term suspended for two years, put him on a drug rehabilitation requirement and told him to do 100 hours of unpaid work.