Pushbutton type programmable pulse

How would I get a one-shot pulse of programmable length using a push-button-like function?


Hi Joe,

It depends on how much accuracy you’re looking for. If you’re looking for something that will be in the ballpark, but maybe not down to the ms, you can do something like this in a function element:

ATMO_GPIO_SetPinState(0, D3, ATMO_GPIO_PinState_High);
ATMO_GPIO_SetPinState(0, D3, ATMO_GPIO_PinState_LOW);

If you’re looking for high accuracy, I would recommend using that platform specific SDK (eg. esp-idf or STM32Cube) that atmosphere is built on top of. There’s currently no built in “pulse” element, unfortunately.

Thanks. I’ll explore your suggestions.