The problem might be with your wallet. Some wallets might not generate the QR code properly, and this is often the case with blockchain.info (the white border around the QR code is missing). You can troubleshoot by using one of these ATM friendly wallets instead:
If you are using an alternative wallet and the ATM still won’t scan your QR code, generate a new address in your wallet and try scanning the new QR code, or lower the brightness of your phone’s screen. Some wallets, like MyCelium, lower the brightness of the QR code if you tap on it.
It’s also important to hold the code in place, without moving, for at least 5 seconds. If you do this, chances are the transaction will go through.
If you have a printed version of the QR code, light the paper from behind. The ATM was originally designed to read LCD screens, but with this trick the paper QR code will also be registered.