background image

 

VMA401 

V. 01 – 01/10/2018 

©Velleman nv 

  count++; 

////////////////////////////////////////////////////////////////////////////// 
//set pins to ULN2003 high in sequence from 1 to 4 
//delay "motorSpeed" between each pin setting (to determine speed) 
void anticlockwise() 

  for(int i = 0; i < 8; i++) 
  { 
    setOutput(i); 
    delayMicroseconds(motorSpeed); 
  } 

 
void clockwise() 

  for(int i = 7; i >= 0; i--) 
  { 
    setOutput(i); 
    delayMicroseconds(motorSpeed); 
  } 

 
void setOutput(int out) 

  digitalWrite(motorPin1, bitRead(lookup[out], 0)); 
  digitalWrite(motorPin2, bitRead(lookup[out], 1)); 
  digitalWrite(motorPin3, bitRead(lookup[out], 2)); 
  digitalWrite(motorPin4, bitRead(lookup[out], 3)); 

 
 

 

10.

 

More Information 

Please refer to the VMA401 product page on 

www.velleman.eu

 for more information. 

 
 
 
 
 
 
 
 
 

Use this device with original accessories only. Velleman nv cannot be held responsible in the event 
of damage or injury resulting from (incorrect) use of this device. For more info concerning this 
product and the latest version of this manual, please visit our website www.velleman.eu. The 
information in this manual is subject to change without prior notice. 

 

© COPYRIGHT NOTICE 
The copyright to this manual is owned by Velleman nv. All worldwide rights reserved. 

No part of this 

manual may be copied, reproduced, translated or reduced to any electronic medium or otherwise without the 
prior written consent of the copyright holder.  
 

Reviews: