Wiegand 26 and Wiegand 34 library for Arduino

unuldinei
Posts: 5
Joined: Tue Jul 21, 2015 8:32 pm

Wiegand 26 and Wiegand 34 library for Arduino

Postby unuldinei » Tue Feb 14, 2017 2:36 pm

Hello, hello, my friends !
How about wiegand on STM32? I work with atmel and is fine https://github.com/monkeyboard/Wiegand- ... or-Arduino
I try to put some pins in interrupts on the code but for STM32F103RET6 not work .

Code: Select all

void WIEGAND::begin()
{
#ifdef digitalPinToInterrupt
  // newer versions of Arduino provide pin to interrupt mapping
   begin(2,digitalPinToInterrupt(2),3,digitalPinToInterrupt(3));
  //begin(PA6,digitalPinToInterrupt(PA6),PA7,digitalPinToInterrupt(PA7));
#else
  begin(2,0,3,1);
//begin(PA6,PA6,PA7,PA7);
#endif

void WIEGAND::begin(int pinD0, int pinIntD0, int pinD1, int pinIntD1)
{
   _lastWiegand = 0;
   _cardTempHigh = 0;
   _cardTemp = 0;
   _code = 0;
   _wiegandType = 0;
   _bitCount = 0; 
   pinMode(pinD0, INPUT);               // Set D0 pin as input
   pinMode(pinD1, INPUT);               // Set D1 pin as input
   attachInterrupt(pinIntD0, ReadD0, FALLING);   // Hardware interrupt - high to low pulse
   attachInterrupt(pinIntD1, ReadD1, FALLING);   // Hardware interrupt - high to low pulse
}
}


any ideea for this? or another library ? thanks !

Return to “Problems with libraries”

Who is online

Users browsing this forum: No registered users and 1 guest