Watch the Add a More Complex Melody Line online guitar lesson by Vicki Genfan from Acoustic Rhythm Guitar Cookbook
If you have trouble getting the "trill" at the beginning, just spend time with it working very slowly, until you have the control and strength to get it sounding like mine. Take note that on the D chord there's only one additional note. Same thing with the F chord. Make sure the "hammered-on" notes are in fact hammered-on, and not picked. This study will help you gain the strength and awareness needed to make sure your hammer-ons and pull-offs are clear.