mirror of
https://github.com/xodio/xod.git
synced 2026-03-03 15:34:03 +01:00
18 lines
334 B
C++
18 lines
334 B
C++
|
|
struct State {
|
|
};
|
|
|
|
{{ GENERATED_CODE }}
|
|
|
|
void evaluate(Context ctx) {
|
|
if (!isInputDirty<input_UPD>(ctx)) return;
|
|
|
|
auto pin = getValue<input_PIN>(ctx);
|
|
auto frequency = getValue<input_FREQ>(ctx);
|
|
auto duration = getValue<input_DUR>(ctx);
|
|
|
|
tone(pin, frequency);
|
|
delay(duration*1000);
|
|
noTone(pin);
|
|
}
|