code: func (s *StepperDriver) step() error {
  	if s.direction == "forward" {
  		s.stepNum++
  	} else {
  		s.stepNum--
  	}
  
  	if s.stepNum >= int(s.stepsPerRev) {
  		s.stepNum = 0
  	} else if s.stepNum < 0 {
  		s.stepNum = int(s.stepsPerRev) - 1
  	}
  
  	r := int(math.Abs(float64(s.stepNum))) % len(s.phase)
  
  	for i, v := range s.phase[r] {
  		if err := s.connection.DigitalWrite(s.pins[i], v); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Step moves motor one step in giving direction