Locomotion emerges from effective interactions with aerial, aquatic, or terrestrial environments. The majority of terrestrial terrain experienced by search-and-rescue or exploratory robots is flowing ground and is often composed of granular media. However, the lack of force models for granular environments has resulted in robotic systems that perform poorly on sandy hills. In contrast, many animal species are highly versatile and remarkably successful at maneuvering on granular media. Thus, they can serve as sources of inspiration for robotic systems to traverse complex granular environments. In this talk, a series of experiments that help us understand the physics of sidewinder snakes’ interactions with a granular environment are presented. We found a control template for sidewinding on sandy inclines: the use of two orthogonal waves whose relative amplitudes are modulated is the key to successful climbing on sand. Next, the first snake robot capable of climbing sandy hills benefitting from this control template is demonstrated. Finally, my current research activities on developing soft robots and magnetic microrobots will be briefly discussed.