We constructed a DNA-based nanomechanical device called the nanometronome. Our device is made by introducing complementary single-stranded overhangs at the two arms of the DNA four-way junction. The ticking rates of this stochastic metronome depend on ion concentrations and can be changed by a set of DNA-based switches to deactivate/reactivate the sticky end. Since the device displays clearly distinguishable responses even with a single base pair difference, it may lead to a single molecule sensor of minute sequence differences of a target DNA.