15,995,388 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10252237 (Top 3 by date)
Member 10252237
4-Nov-14 6:52am
View
solved, here is source code
// ****************************************
//
// File: em4102.biometric.1v1.twn.c
// Date: 2014/11/03
// Version: 1.00
// Mod: AA
//
// ****************************************
#include <sys.twn.h>
const byte MAXIDBYTES = 8;
const byte MAXIDBITS = MAXIDBYTES*8;
byte ID[MAXIDBYTES];
byte IDBitCnt;
byte TagType;
byte LastID[MAXIDBYTES];
byte LastIDBitCnt;
byte LastTagType;
void main()
{
// Make some noise at startup at minimum volume
Beep(BEEPSUCCESS);
// Set maximum volume
SetVolume(4);
// A V24 device is sending the version at startup
if (GetConnection() == V24)
{
HostSendVersion();
HostSendChar('\r');
}
// Turn on green LED
LEDSet(GREEN,ON);
// Turn off red LED
LEDSet(RED,OFF);
// No transponder found up to now
LastTagType = TAGTYPE_NONE;
while (TRUE)
{
// Search a transponder
if (TagSearch(ID,IDBitCnt,TagType))
{
if (TagType == TAGTYPE_EM4102)
{
// Is this transponder new to us?
if (TagType != LastTagType || IDBitCnt != LastIDBitCnt || !CompBits(ID,LastID,MAXIDBITS))
{
// Save this as known ID, before modifying the ID for proper output format
CopyBits(LastID,0,ID,0,MAXIDBITS);
LastIDBitCnt = IDBitCnt;
LastTagType = TagType;
// Yes! Sound a beep
Beep(BEEPHIGH);
// Turn off the green LED
LEDSet(GREEN,OFF);
// Let the red one blink
LEDSet(RED,BLINK);
// Send last 3 bytes
HostSendHex(ID[2],3*8,3*2);
HostSendChar('\r');
}
// Start a timeout of two seconds
StartTimer(0,20);
}
}
if (TestTimer(0))
{
LEDSet(GREEN,ON);
LEDSet(RED,OFF);
LastTagType = TAGTYPE_NONE;
}
}
}
Member 10252237
1-Nov-14 11:20am
View
sorry i didnt explain exactly, i can but dont know how.....
Member 10252237
1-Nov-14 5:45am
View
yes of course need to cut of the first four, problem is that script is not created by me, it is script of manufacturer and i cant modify it for achieve it.... it is reason why i posted here, maybe wil be somebody succesfull.