having trouble programming the solenoids

the thing is it's not that I need to just turn the solenoid off and on I need to make them on-off-ing really fast.

Hi Pieter,

what do these solenoids look like? Do yo uhave a picture? If you want them to vibrate at 40hz this may be a physical impossibility... and en electrical one too. Physically, depending on how much mass these move and how far, 100ms is not going to be enought time for the solenoids to activate fully. Also, driving a solenoid at high speed may require a more complicated circuit.. as would driving any high-inductance circuit at high speed.

that's my 2ยข

D