Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jonyjazy

Pages: [1]
1
Lua / "Bypass" APD in Nspire
« on: March 04, 2015, 01:22:38 pm »
Hello

Is there a way to bypass the Nspire APD to run a Lua script?
What I want to do is to write a script that runs continuously for several hours. The problema is that Nspire shutsdown and
stops the script. I can increase the APD but that´s not enough.

Thanks

Jony

2
Lua / Re: Lua and Sensors
« on: February 09, 2015, 04:52:13 am »
I liked the "Ow...." comment a lot! :)

First of all thanks for your help. I´m really new at this so all help is more than welcome.

Thank you

3
Lua / Re: Lua and Sensors
« on: February 06, 2015, 07:24:21 am »
Hello again.

Here is the code

"
bridge1=image.new(_R.IMG.bs)
bridge2=image.new(_R.IMG.bola2)
timer.start(0.01)
function on.timer()
    local pc=var.recall("meter.posição")
    local vc=var.recall("meter.velocidade")
    local ac=var.recall("meter.aceleração")
    function on.paint(gc)
    gc:drawImage(bridge1,0,0)
    gc:setColorRGB(250,250,250)
    gc:drawString("Posição-> "..pc,22,22)
    gc:drawString("Velocidade-> "..vc,22,44)
    gc:drawString("Aceleração-> "..ac,22,66)
    gc:drawImage(bridge2,200,28+70*pc)
    platform.window:invalidate()
    gc:setColorRGB(183,119,103)
    gc:fillArc(195+18*pc,203,10/pc,8,0,360)
    end
end
"

What it does is to draw a ball (image on bridge2) up and down according to the position the sensor grabs. Only problem is that there is a delay on what we see (looking at the real object) and the output of the Lua.

Thanks

4
Lua / Lua and Sensors
« on: February 05, 2015, 04:57:37 am »
Hello

When I do a Lua program to display live readings from sensors via var.recall, I get a delay from the happening of an event to the display of that event. Why is that? How can I solve this?

For exemple, if I use a motion detector and move an object, only about 1s of moving it the Lua shows the information on screen.

Thanks


Pages: [1]