This is where you talk about the NXJ software itself, installation issues, and programming talk.
Moderators: 99jonathan, roger, imaqine
Hi I would like to program a class using Timer to show a character in LCD. Anybody can help me?
I dont know how to use Timer class in NXJ.
Juan Antonio Breña Moral
- Advanced Member
- Posts: 290
- Joined: Wed Sep 13, 2006 12:16 am
- Location: Madrid, Spain
First you create a TimerListener class by extending the TimerListener interface. Implement a method called timedOut() as the interface requires. Everytime the timer clicks, this method will be called, so I assume you want to update your LCD image here.
Then make a timer object that uses your timerListener - specify the delay and your TimerListener:
Timer(int theDelay, TimerListener el)
The rest is pretty self explanatory from the API docs for Timer.
- Site Admin
- Posts: 392
- Joined: Fri Aug 04, 2006 4:03 pm
Return to NXJ Software
Who is online
Users browsing this forum: Yahoo [Bot] and 1 guest