# Pulse to AUX1 example

**URL:** <https://discuss.blues.com/t/pulse-to-aux1-example/2069>\
**Category:** Notecard API\
**Created:** [April 17, 2024, 12:27am UTC](https://discuss.blues.com/t/pulse-to-aux1-example/2069 "2024-04-17T00:27:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hussat](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/hussat/32/1155_2.png) [@hussat](https://discuss.blues.com/u/hussat)\
**Post date:** [April 17, 2024, 12:27am UTC](https://discuss.blues.com/t/pulse-to-aux1-example/2069/1 "2024-04-17T00:27:10Z")

</div>

Hi all,

I’ve been experimenting with switching the AUX1 pin and it works fine by sending JSON via the USB e.g. the JSON below switches AUX1 high

{“req”:“card.aux”,“mode”:“gpio”,“usage”:[“high”,“”,“”,“”]}

It also works fine using the Environment

\_aux\_gpio\_set=high,

However, I’ve had no success pulsing AUX1 using the example in the Docs “[Pulsing GPIO Outputs High or Low with Environment Variables]”.([Working with the Notecard AUX Pins - Blues Developers](https://dev.blues.io/notecard/notecard-walkthrough/working-with-the-notecard-aux-pins/#pulsing-gpio-outputs-high-or-low-with-environment-variables))

I have tried JSON with no success

{“req”:“card.aux”,“mode”:“gpio”,“usage”:[“high,1300,1713311000,60”,“”,“”,“”]}

or the Environment

\_aux\_gpio\_set=high,1300,1713311000,60,

I’m using

DeviceUID dev:867730051231110 (NOTE-NBGL-500) running firmware 7.2.2.16518

When I apply changes to the Environment variable and use send the JSON {“req”: “hub.sync”} via the USB, then the Notecard connects to the server, then immediately AUX1 goes HIGH. It does not pulse & AUX1 did not go high at the correct time.

I’m stumped. Can anyone suggest what I’m doing wrong.

Thanks,

Paul H

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [April 17, 2024, 12:36am UTC](https://discuss.blues.com/t/pulse-to-aux1-example/2069/2 "2024-04-17T00:36:16Z")

</div>

Hi @hussat,

I think you’re just missing some commas in that string. The first set of args specifies which of the 4 AUX GPIO pins you want to work with (including empty spots for those that you aren’t using, which is the confusing part):

```auto
_aux_gpio_set=high,,,,1300,1713311000,60

```

…will pulse `AUX1` high for `1300` ms for `60` seconds starting at `1713311000`.

---

<div class="post-metadata">

**Author:** ![hussat](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/hussat/32/1155_2.png) [@hussat](https://discuss.blues.com/u/hussat)\
**Post date:** [April 17, 2024, 2:56am UTC](https://discuss.blues.com/t/pulse-to-aux1-example/2069/3 "2024-04-17T02:56:25Z")

</div>

Thanks Rob. Got it.

I’m using AUX1 to switch power to my sensor, which is probably a common application. As measurements are taken on a regular interval, it would be great to also be able to specify an interval.

For example, `_aux_gpio_set` with a value of `,,,high,1300,1713322315,31536000, 86400` means pulse `AUX4` `HIGH` for 1300ms, valid for 3153600 seconds (1 year) from 1713322315 until 1744858315, repeating every 86400 seconds (1 day).

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [April 17, 2024, 2:19pm UTC](https://discuss.blues.com/t/pulse-to-aux1-example/2069/4 "2024-04-17T14:19:50Z")

</div>

Hi @hussat,

This is an interesting idea. In the meantime, I would suggest looking at implementing this with a paired host as the “timer” to manage the interval.

Rob
