cuamckuu / nfc-frog

Contactless EMV credit card reader
MIT License
284 stars 52 forks source link

Does exist method to call beep inside device when card is attached? #3

Closed Rombersoft closed 3 years ago

cuamckuu commented 3 years ago

This is part from main.cpp, that might be helpful. It will wait for card to be attached and then calls for beep() function which you can define yourself

        DeviceNFC device;
        std::cerr << "[Info] NFC reader: " << device.get_name() << " opened.\n";

        while (!device.pool_target()) {
            std::cerr << "[Info] Searching card..." << std::endl;
            std::this_thread::sleep_for(std::chrono::seconds(1));
        }
        beep() // Here is your code
Rombersoft commented 3 years ago

error: ‘beep’ was not declared in this scope

cuamckuu commented 3 years ago

You should define that function yourself and make "beep" and other stuff you want there, that's why there is comment

Rombersoft commented 3 years ago

Thank you very much. Very useful advise!