^^^ This! One of my first clients got me at a ridiculously low rate, and has over history been the most demanding client I've ever had.
That said, I used to use this client as a tester to try out different wordings when I've upped my rates, so it wasn't a total loss ;)
"Work for full price or for free. Never for cheap." is the most useful advice on this subject.
If you do stuff for free --- and we do --- make sure it's different stuff than what you charge for. We are, for instance, happy to give free advice, or to chat on the phone with you about problems. We are not going to be happy to take a little time testing your app.
This isn't just me pontificating. More often than not, when I've tried to help people out with free project work, things have gone badly with the project itself.
This resulted in me getting a stack of journal articles about several subjects. Most memorably, steel smelting and formation of microbubbles. I don't really know much about microbubbles, so the professional thing to do was say "When they said 'technical translation', they really meant 'regarding software' because that's really what we do here". The client said "Who cares? Its free. Just do your best." So I did my best and asked copious questions about steel smelting. "I don't really have time to deal with you this week. But hey, its free, just do your best. We'll be happy." So they got a journal article they wanted to submit for publication with grammatically correct English which almost certainly contained numerous material errors of fact.
It was a tremendous waste of the time and professional reputation of everyone involved.
If you want to help out a friend/non-profit and actually have the time to do it, "free" is usually a better option. That said, you still need to keep the scope of what you intend to do for "free" ironclad, otherwise it will probably creep out of control just like any other project.
When I wanted to do some consulting work, I contacted folks I knew from blogging (and other forms of participation on the Internet) and said "Hey, are you interested in buying my time? I know you need X, you know I can do X very well, how's about I X for you?" (Both of them said "X is kind of meh but if you could Y we'd be thrilled", and happily I could Y, too.)
How much you charge starting out is entirely a market question. I'll give you my typical pricing advice for anything: "Charge more." You will have better clients, because cheapskates are disproportionately pathological clients, and your clients will be happier with your work. Price communicates an expectation of value, and that framing is shockingly durable. Incidentally, if they're hiring you rather than an undifferentiated freelancer in X, then the global market clearing price is whatever you say it is.
You can also get inbound offers in a similar fashion. (If I were more interested in them, I'd have a page on my site advertising my availability and making a focused case for hiring me, and I'd optimize that page with all the tricks I use for product pages. And detail exactly how I did it on the page, because that is, after all, a visible indication that I'm good at what I claim to be good at.)