This is exactly what I did with my first book. It is available for free on Leanpub, but I charge minimum for Kindle/print using Amazon KDP.
I just wanted to get my message across and learn something on the way. It also sells relatively well, but that is a side-effect of my initial intentions :)