# Arduino Sleep Node

**URL:** <https://forum.xod.io/t/arduino-sleep-node/5833>\
**Category:** XOD Programming Questions\
**Created:** [February 3, 2022, 5:39am UTC](https://forum.xod.io/t/arduino-sleep-node/5833 "2022-02-03T05:39:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayafesta](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rayafesta](https://forum.xod.io/u/rayafesta)\
**Post date:** [February 3, 2022, 5:39am UTC](https://forum.xod.io/t/arduino-sleep-node/5833/1 "2022-02-03T05:39:19Z")

</div>

Hello All, I’m new to XOD and have an issue with nkrkv’s “sleep-until-switch” (on UNO & NANO). I have seen several posts with the same issue but no recent solutions. This node is exactly what I need but errors in compiling. Could anybody direct me to the issue here, any help would be greatly appreciated. Comp errors below

C:\Users\Me\AppData\Local\Temp\xod\_temp\_sketchbookUWNmoo\xod\_1643866566438\_sketch\xod\_1643866566438\_sketch.ino: In instantiation of ‘void xod::nkrkv\_\_avr\_sleep\_\_sleep\_until\_switch::Node\<constant\_input\_WAKE\>::evaluate(xod::nkrkv\_\_avr\_sleep\_\_sleep\_until\_switch::Node\<constant\_input\_WAKE\>::Context) [with unsigned char constant\_input\_WAKE = 2; xod::nkrkv\_\_avr\_sleep\_\_sleep\_until\_switch::Node\<constant\_input\_WAKE\>::Context = xod::nkrkv\_\_avr\_sleep\_\_sleep\_until\_switch::Node\<2\>::ContextObject\*]’:  
C:\Users\Me\AppData\Local\Temp\xod\_temp\_sketchbookUWNmoo\xod\_1643866566438\_sketch\xod\_1643866566438\_sketch.ino:5186:37: required from here  
C:\Users\Me\AppData\Local\Temp\xod\_temp\_sketchbookUWNmoo\xod\_1643866566438\_sketch\xod\_1643866566438\_sketch.ino:2948:24: error: invalid use of non-static member function ‘void xod::nkrkv\_\_avr\_sleep\_\_sleep\_until\_switch::Node\<constant\_input\_WAKE\>::wakeISR() [with unsigned char constant\_input\_WAKE = 2]’  
attachInterrupt(g\_interruptNum, wakeISR, CHANGE);  
~~~^~~~~~~~~~~~~~~~~~~~~  
C:\Users\Me\AppData\Local\Temp\xod\_temp\_sketchbookUWNmoo\xod\_1643866566438\_sketch\xod\_1643866566438\_sketch.ino:2915:10: note: declared here  
void wakeISR() {  
^ ~~~~~~

Error during build: exit status 1  
Compilation failed  
Command Process exited with code 1  
The generated C++ code contains errors. It can be due to a bad node implementation or if your board is not compatible with XOD runtime code. The original compiler error message is above. Fix C++ errors to continue. If you believe it is a bug, report the problem to XOD developers.

---

<div class="post-metadata">

**Author:** ![wayland](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/wayland/32/1590_2.png) [@wayland](https://forum.xod.io/u/wayland)\
**Post date:** [February 4, 2022, 6:39pm UTC](https://forum.xod.io/t/arduino-sleep-node/5833/2 "2022-02-04T18:39:36Z")

</div>

Try [wayland/avr-sleep — XOD](https://xod.io/libs/wayland/avr-sleep/)

---

<div class="post-metadata">

**Author:** ![rayafesta](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@rayafesta](https://forum.xod.io/u/rayafesta)\
**Post date:** [February 5, 2022, 6:13am UTC](https://forum.xod.io/t/arduino-sleep-node/5833/3 "2022-02-05T06:13:23Z")

</div>

Excellent!! works like a charm, thanks for the help.

---

<div class="post-metadata">

**Author:** ![wayland](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/wayland/32/1590_2.png) [@wayland](https://forum.xod.io/u/wayland)\
**Post date:** [February 5, 2022, 8:56am UTC](https://forum.xod.io/t/arduino-sleep-node/5833/4 "2022-02-05T08:56:05Z")

</div>

You’re welcome. Thanks for the feedback.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [March 7, 2022, 8:57am UTC](https://forum.xod.io/t/arduino-sleep-node/5833/5 "2022-03-07T08:57:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
