cuamckuu/nfc-frog

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

Rombersoft opened this issue · 4 comments

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

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

error: ‘beep’ was not declared in this scope

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

Thank you very much. Very useful advise!