gpio/pin-mode does not work inside loops
chr15m opened this issue · comments
Chris McCormick commented
Using this:
(def start-low (list 3 6 12 23 16 17))
Both of these forms fail with the same error:
(map (fn [p] (gpio/pin-mode p :output)) start-low)
(doseq [p start-low]
(do
(gpio/pin-mode p :output)
(gpio/digital-write p :low)))
Here is the error:
error: 'p__13889' was not declared in this scope
::pinMode(number::to<number_t>(p__13889), OUTPUT);;
^
Note that the gpio/digital-write
inside the loop does not throw an error.
Nurullah Akkaya commented
4bf3af9 fixes this issue.