My biggest key for this is to work on something you enjoy. Find something that you feel is wrong, or too difficult or too cumbersome and solve it technically.
For example:
Problem: There was too much street light at night to sleep coming through my window, so I bought black out blinds. Then I didn't have enough light to wake up in the morning and always felt sluggish.
Solution: I created an arduino sensor to detect morning light (depending on time of year) and then using a motor on the blind cord, it opens my blinds gradually so I have a nice natural wake up.
And it's powered by solar. I literally never need an alarm clock again. (All thought I still set one, good developers always have a plan b)