CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: Strontium on April 25, 2015, 06:53:08 AM

Title: [TI-nspire CX] TiLight
Post by: Strontium on April 25, 2015, 06:53:08 AM
I seem to always have my calculator with me, and have often used it to see in the dark. But I needed a better way to do this! So, I created TiLight (pronounced Tie Light).

Its very simple, but its my first real project for my calculator. The source code is included in the download.

Use the up arrow key to increase the brightness, and the down arrow key to decrease the brightness. There are also some presets in the menu.
Title: Re: TiLight
Post by: Dream of Omnimaga on April 25, 2015, 07:10:51 AM
So what does this program do? Does it just change the brightness? Because we can already increase/decrease it from the TI-OS. It might be good to describe all its features so people who don't know Lua know what it does before downloading.
Title: Re: [TI-nspire CX] TiLight
Post by: Snektron on April 25, 2015, 07:38:11 AM
Yeah, and maybe include some screenshots too :3
Title: Re: TiLight
Post by: Strontium on April 26, 2015, 01:14:00 AM
Quote from: DJ Omnimaga on April 25, 2015, 07:10:51 AM
So what does this program do? Does it just change the brightness? Because we can already increase/decrease it from the TI-OS. It might be good to describe all its features so people who don't know Lua know what it does before downloading.

It allows you to control the amount of light the screen gives off. At max brightness, its just plain white. At minimum, pitch black. The reason I made it was just so that I can have a blank white screen to maximize the amount of light it gives off, as well as control the light more accurately.

Also, I wouldn't say its very useful. It was pretty much a way for me to practice Lua in a way that I would have something I could use.
Title: Re: TiLight
Post by: alexgt on April 26, 2015, 01:16:56 AM
Sounds cool but I carry my Prime in my pocket now not my Nspire :(
Title: Re: TiLight
Post by: Dream of Omnimaga on April 26, 2015, 04:29:24 AM
Quote from: Strontium on April 26, 2015, 01:14:00 AM
Quote from: DJ Omnimaga on April 25, 2015, 07:10:51 AM
So what does this program do? Does it just change the brightness? Because we can already increase/decrease it from the TI-OS. It might be good to describe all its features so people who don't know Lua know what it does before downloading.

It allows you to control the amount of light the screen gives off. At max brightness, its just plain white. At minimum, pitch black. The reason I made it was just so that I can have a blank white screen to maximize the amount of light it gives off, as well as control the light more accurately.

Also, I wouldn't say its very useful. It was pretty much a way for me to practice Lua in a way that I would have something I could use.
Aah ok so it's like contrast changing, except that it can set the contrast much higher or lower than the TI-OS normally allows to?
Title: Re: TiLight
Post by: LD Studios on April 26, 2015, 04:06:04 PM
I'm curious as to why you made expanding black/white bars rather than just changing the rgb value of the background. Also, your help menu is pretty pointless because it's easier to just figure it out than it is to find the help menu.
EDIT: I was bored so I messed around with the code a little. The code was pretty neat+efficient, which makes me feel better about entrusting Portal NSpire with you ^.^ I made it change the rgb value of the background instead of expanding/collapsing bars. I made esc toggle help instead of just closing it, and added a strobe light. It's kind of a useless program, but whatever :P
Title: Re: TiLight
Post by: Dream of Omnimaga on April 26, 2015, 04:33:26 PM
Wait do you mean that the method to increase brightness he uses is displaying white bars? In such case I kinda agree with you, as the calc is more than capable to change the RGB of the screen. As for help, I would recommend making it standalone in a Notepad-compatible readme file. Many Nspire programmers have the bad habit of putting their readmes inside the .tns file and not including a .txt version. This is annoying because then we have no clue about what we are downloading and in Lua's case, it takes even longer because we always forget the keypad shortcut to switch between tabs so we have to spend 10 minutes finding the instruction manual on TI website to look up for the key combo.

That reminds me I need to make this a contest rule to include a .txt readme with the controls.