I am new to the forums and just wanted to say hi and ask a question I can not find from searching the internet.

I want to make a program in lua that will have direct access to probes/sensors with out using Vernier DataQuest. I want to be able to get the raw data and be able to have my program use the data directly. Does anyone know if there is a way to use probes/sensors in your programs?
Hi DrRandall, welcome to Cemetech =)

Just to clarify, are you referring to Lua for the Nspire? Or LuaZM?


Nevermind, I see the topic title has been updated to reflect that.
Lua for Nspire. and yes thank you for who ever edited my topic Smile
I've never worked with probes and Vernier Data, but I assume there is a way to store data as a math variable (standard variable in nspire documents). You can access math variables in lua using math.recall(name).
What LDStudios said is mostly right.

Critor and I have made a few examples with Lua and Vernier sensors :
Compass : https://tiplanet.org/forum/archives_voir.php?id=3849 (video : https://www.youtube.com/watch?v=R4n3wR3YQWA#t=58 )
Thermometer : https://tiplanet.org/forum/archives_voir.php?id=3848

You can look at the source if you want, but basically, take the variable name that the Vernier app uses (it's localized, weirdly enough, at least it was in OS 3.2 IIRC), and then from the lua script, within a timer (to get updates in real-time), "sync" the lua variable with the basic variable's value with var.recall().
You can also make yourself (in Basic) a helper function to do some checks/calculations prior to Lua if you want/need.

Note : the variable names, even if localized, are (if they didn't change it recently) meter.xxxx where xxx is whatever depending on the sensor and lang.

Edit : there's also this example by TI (ethane molecule in 3d, linked with the 3-axis accelerometer sensor, I got to try it while at TI, it's pretty slick) : https://tiplanet.org/forum/archives_voir.php?id=3609
Video : https://www.youtube.com/watch?v=mgwYibFWG04
Thank you guys this is exactly what I am looking for. I will upload any code that I work on so you guys can share in what I am learning. Again thank you guys so much
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum