Mothballs or moth flakes are also touted as a supposed mole and vole repellent. Again, the idea is to sprinkle the moth balls down the holes, tunnels and burrows of mole and voles.
I would use coffee grounds as part of your mole repelling arsenal but I don't think they are strong enough to repel moles on their own, but they can certainly help.