This drive is working well with "LPD3806-600BM-G5-24G", and have Simple program

Dependencies:   mbed

main.cpp

Committer:
Yifan_Du
Date:
2019-02-19
Revision:
3:6a91d523b146
Parent:
2:7d34758c3cc4

File content as of revision 3:6a91d523b146:

// Attention: External pull-up resistance is required
/*
    Red Line -> 5V
    Black Line -> GND
    Green Line -> your STM32 pin
    White Line -> your STM32 pin
*/
#include "mbed.h"
#include "Rotary_Encoder.h"
//              (White Line, Green Line)
Rotary_Encoder Encoder(PA_0, PA_1);

  int main(void)
  {
      while(1)
    {
         printf("Direction: %s\r\n", Encoder.Calculate_Direction());
         printf("\r\n");

         wait(0.2);
    }
}