DAT vs. VAR
Basil
Posts: 380
Hi All,
Ok enough with the hardware questions, im on to the software
I have a whole lot of variables which I need to record and log, and also alot of runtime variables for all the calculations of altitude etc. Theres also a couple of flags thrown in there (true/false type variables). The variables which I need to record (E.g Raw data from the accelerometer, pressure sensor. Times at which events occur etc) will be periodically written to the a dataflash chip in pages.
It appears I can use either VAR or DAT for assign memory space to them, but I'm having trouble understanding where the difference lies, its my first time programming a prop.
Could someone please explain to me which situations VAR should be used, and which situations DAT should be?
Thank,
Alec
Ok enough with the hardware questions, im on to the software
I have a whole lot of variables which I need to record and log, and also alot of runtime variables for all the calculations of altitude etc. Theres also a couple of flags thrown in there (true/false type variables). The variables which I need to record (E.g Raw data from the accelerometer, pressure sensor. Times at which events occur etc) will be periodically written to the a dataflash chip in pages.
It appears I can use either VAR or DAT for assign memory space to them, but I'm having trouble understanding where the difference lies, its my first time programming a prop.
Could someone please explain to me which situations VAR should be used, and which situations DAT should be?
Thank,
Alec
Comments
please have a look at this thread where Mike has explained this.
http://forums.parallax.com/showthread.php?p=650210
Thomas
Thanks Kaio and Mike