How to make current pulses
See 
PWM (Pulse width modulation) is a technique used by micro controllers (such as Arduino)  which is used to generate analog output(results) by using digital means. Digital output is either on (or 5V in Arduino)  or off ( or 0V). PWM techniques uses on and off pattern to stimulate analog results. For this first the on state is activated for a small period of time... and then off state is maintained. This is repeated several times (500 or 1000 times... This can also be changed by programming in Arduino). Thus this appears as an analog effect to our eyes and we think that it is giving a output between 0V and 5V. But actually it is digital signals only which are on and off during a cycle ( called duty cycle.. And in this the proportion of on state in each cycle is shown with a percentage)  and this cycle is repeated several times. A 0% duty cycle is analog off (or CAN be called digital off too) and 100% duty cycle is complete analog on (or CAN be called digital on too).

Study the graph below to get more idea. 
PWM graph with different duty cycles. ]1

For more information go to the Arduino website and search for PWM. 

Good day!