File Switch.cpp¶ File List > examples > Switch > Switch.cpp Go to the documentation of this file Source Code¶ #include "daisy_seed.h" using namespace daisy; DaisySeed hw; Switch button; int main(void) { hw.Init(); button.Init(seed::D9); while(1) { button.Debounce(); if(button.Pressed()) hw.SetLed(true); else hw.SetLed(false); } }