Close but no cigar...
Here is the code for 10 times per second...
mainloop:
Gosub getx ' Get x value
Gosub gety ' Get y value
Gosub getz ' Get z value
Lcdout $fe, 1, "x=", #x, " y=", #y, " z=", #z ' Send values to LCD
Pause 100 ' Do it about 10 times a second
Goto mainloop ' Do it forever
that 'Pause 100' means you're going to wait 100mS between samples... and, if you were awake during your maths class at school, you'll remember there's ten 100mS periods in every second.
(1mS=1/1000th of a second)
So, you change the Pause 100 to Pause 10, now there are one-hundred 10mS periods in one second so you will therefore do one-hundred loops...
Melanie
Bookmarks