Mr Gilleard denies all terror charges
A Nazi sympathiser made nail bombs "when he was just sat about bored," a court has heard.
Martyn Gilleard, 31, told the jury at Leeds Crown Court he had been a member of far right groups including the National Front.
But he denied the four nail bombs, which were found by police in a holdall under his bed, were intended to cause serious violence.
Mr Gilleard, of Goole, East Yorkshire, denies all terrorism charges.
He denies preparing for terrorist acts and possessing articles and collecting information for terrorist purposes.
Giving evidence, Mr Gilleard agreed he had been a member of a number of far right groups including the National Front, and the White Nationalist Party.
He also agreed he had a collection of Nazi memorabilia, saying Nazism appealed to him because of the way the Nazis rebuilt Germany.
He told his barrister, David Hatton QC: "I did have racist views, yes."
When asked why he made the bombs he said: "I'd had a couple of cans. I was just sat around bored."
He went on: "An idea popped up and I thought 'why not'. I thought 'I've got pretty much what I need' and I threw them together."
Officers also discovered "potentially lethal bladed weapons", 34 bullets for a 2.2 calibre firearm and printouts from the internet about committing acts of terrorism, the court has heard.
These included instructions on how to make a bomb and how to poison someone to death.
Mr Gilleard pleaded guilty at an earlier hearing to possessing 34 cartridges of ammunition without holding a firearms certificate.
The trial continues.