# Is there any way I can call an instance of a function repeatedly with the function retaining internally the last state of the GPIO pin

**URL:** <https://discourse.julialang.org/t/is-there-any-way-i-can-call-an-instance-of-a-function-repeatedly-with-the-function-retaining-internally-the-last-state-of-the-gpio-pin/58748>\
**Category:** Internals & Design\
**Tags:** gpio, raspberry-pi\
**Created:** [April 7, 2021, 12:09pm UTC](https://discourse.julialang.org/t/is-there-any-way-i-can-call-an-instance-of-a-function-repeatedly-with-the-function-retaining-internally-the-last-state-of-the-gpio-pin/58748 "2021-04-07T12:09:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [April 7, 2021, 12:15pm UTC](https://discourse.julialang.org/t/is-there-any-way-i-can-call-an-instance-of-a-function-repeatedly-with-the-function-retaining-internally-the-last-state-of-the-gpio-pin/58748/2 "2021-04-07T12:15:47Z")

</div>

This thread has a few suggestions you might find helpfuL: [In Julia, how to create a function that saves its own internal state?](https://discourse.julialang.org/t/in-julia-how-to-create-a-function-that-saves-its-own-internal-state/58457)

---

_[View the full topic](https://discourse.julialang.org/t/is-there-any-way-i-can-call-an-instance-of-a-function-repeatedly-with-the-function-retaining-internally-the-last-state-of-the-gpio-pin/58748)._
