Beginner can't pass values between cogs
scidog
Posts: 4
Hello,
Looking at these two SPIN files, I (as a rank beginner) would say that they should do the same thing. That is, both spin files should flicker pins 4 and 6 hi/lo many times a second.
I am obviously so very wrong.
The attached "good" file works: The value for variable "ADCX" is utilized properly and the !outa[noparse]/noparse statements flicker the output pin states many times a second.
The bad file shows no errors, yet not a thing happens either.
All I want to do is pass the value from the first public method to the second for use.
This little example showcases a fundamental problem I have passing values between methods, let alone cogs.
I need to be able to pass global variables between methods, and for some reason I cannot see the attached bad code file does not.
Can anyone help?
Thanks,
scidog
Looking at these two SPIN files, I (as a rank beginner) would say that they should do the same thing. That is, both spin files should flicker pins 4 and 6 hi/lo many times a second.
I am obviously so very wrong.
The attached "good" file works: The value for variable "ADCX" is utilized properly and the !outa[noparse]/noparse statements flicker the output pin states many times a second.
The bad file shows no errors, yet not a thing happens either.
All I want to do is pass the value from the first public method to the second for use.
This little example showcases a fundamental problem I have passing values between methods, let alone cogs.
I need to be able to pass global variables between methods, and for some reason I cannot see the attached bad code file does not.
Can anyone help?
Thanks,
scidog
Comments