The self-check machines in the lobby have the ability to recognize library card barcodes that have been scanned into apps (for example, an app like ExpressCheckout). I just tried it myself and it worked.
I also did an experiment to see if the self-check machine would recognize a picture I took of my library card, and it did! I was able to check out a book.
So, to answer your question about putting your barcode on your phone: you can try out whatever you feel comfortable with: the CardStar app (or a similar app) or even a good, clear picture of your library card on your phone should work.
You can also take a picture of your library card and our self-check machines will read the barcode on the picture too.