5 position rotary switch

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
Mikemike
Posts: 41
Joined: Thu Feb 11, 2021 11:33 pm

Re: 5 position rotary switch

#11 Post by Mikemike »

Sling,

YEEEEES! IT WORKS! HAHA....I know this is probably so simple and boring to a lot of viewers, but dangit, it's working, haha. I truly appreciate the assistance, and I look forward to using this knowledge on other tasks. This has freed up like 5 of my digital I/O's.
IMG_7390.JPG



BIG THANKS!

Mikemike

User avatar
Sling
Posts: 5239
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: 5 position rotary switch

#12 Post by Sling »

Great. Glad you got it working.

The AM scripting language is Lua so the <= operator is just a Lua language thing. These are called relational operators. If you want to learn more about these little details of the Lua language this is a good starting point but there are many other good resources.

https://www.lua.org/pil/contents.html#3
Last edited by Sling on Sat Feb 13, 2021 3:53 am, edited 1 time in total.

Mikemike
Posts: 41
Joined: Thu Feb 11, 2021 11:33 pm

Re: 5 position rotary switch

#13 Post by Mikemike »

Sling wrote: Sat Feb 13, 2021 3:21 am Great. Glad you got it working.

The AM scripting language is Lua so the <= operator is just a Lua language thing. These are called relational operators. If you want to learn more about these little details of the Lua language this is a good starting point but their are many other good resources.

https://www.lua.org/pil/contents.html#3
Perfect!

Thanks again,
Mikemike

User avatar
Ralph
Posts: 7924
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: 5 position rotary switch

#14 Post by Ralph »

< and > always have to come first, that's just the way Lua does it.

Mikemike
Posts: 41
Joined: Thu Feb 11, 2021 11:33 pm

Re: 5 position rotary switch

#15 Post by Mikemike »

Ralph wrote: Sat Feb 13, 2021 6:15 am < and > always have to come first, that's just the way Lua does it.
Thanks Ralph!

Mikemike

Post Reply