, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here
I cannot get a variable range function to work.
#get compass value
if ($CompassHeading = 145)
Print("Left") # this will actually be a GoTo to allow a motor speed trim value
# to be added or subtracted to the correct motor to get back on
I don't see any range examples in the If function list.
My actual script trims the heading. I will compare the current heading to an allowable value. if the value is within the limit it goes straight. If the deviation is more than or less than the acceptable limit values, it will add or subtract speed to the correct motor to return to the heading.
I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.
Also, consider reviewing the Learn section for informative lessons and activities.
Check it out!
That answers the question. In PLC logic was a simplified Range function which I used a lot.
The new Blockly will help me get on track.
Yeah I screwed up loading the code example, but your reminder jogged the memory.
Thanks for the help.