Transferring data between objects
Lucky
Posts: 98
Hi, I am new to the propeller and· I· am not use to the spin language. I was wondering how one goes about transferring data such as a variable from one object to another? Do you use the DAT command to write it to main memory? Can anyone post some code where one object refers to another object's method and then returns a value to the caller object?
Comments
You can then get the value of 'important' by writing 'lower.getImportant' and you can set the value of 'important' to 6 by doing something like 'lower.setImportant(6)'
Similar things can be done with other variables which can be longs, words or bytes. You can also create a method in 'myObject' that returns the address of a variable and use that in your main program to reference the variable.