π
<-

Ndless KeyListener

C, C++, ASM...

Re: Ndless KeyListener

Unread postby Vogtinator » 08 May 2016, 00:37

There is unfortunately not much information about the relatively new ASI API.
You can try to interface with it using Ndless Lua extensions, but I'm not sure how that works out.

What about a Ndless Lua module that exposes a single function "waitForKeyPress" or similiar to work around the lua limitations?
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Re: Ndless KeyListener

Unread postby MishaShapo » 08 May 2016, 00:41

I will have to read-up on Ndless Lua modules (I don't know much how to use them yet) and see if it helps. But I anticipate that it will take me a day or two to learn. Thank you very much for helping me with this project. What would be the best way to contact you if I have a question in the future?
User avatar
MishaShapo
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 68%
 
Posts: 17
Joined: 06 May 2016, 04:58
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Ndless KeyListener

Unread postby Adriweb » 08 May 2016, 00:42

He and I, among others here, are around on IRC, particularly in the #firebird-emu channel of the EFNet servers :)

(I'd be happy to help with Nspire-Lua stuff if needed, btw, although it seems you have done quite some interesting things with the ASI API (which is pretty new) - you should post that somewhere \o/)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.7%
 
Posts: 14820
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: Ndless KeyListener

Unread postby MishaShapo » 08 May 2016, 00:52

Wow, Adriweb and Vogtinator are helping me with my project. This is insanely awesome! =D . Adriweb, If you look at my previous post, it outlines what I am trying to do. I suppose that I need to use the key-listening capabilites of the hooks that Vogtinator showed me and the USB-port communicating capbilites of the Lua ASI API all while running this in the background so that my teacher can continue to use her calculator as normal. Could you give me some pointers on where to start ? Thank you. :)
User avatar
MishaShapo
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 68%
 
Posts: 17
Joined: 06 May 2016, 04:58
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Ndless KeyListener

Unread postby MishaShapo » 09 May 2016, 22:59

Vogtinator, I borrowed my teachers CAS and flashed an image onto firebird, and indeed you are correct that the hooks you gave me for the touchpad and keypad work for the CAS, but the non-CAS hooks for the touchpad still do not work on the non-CAS firebird flash and my real-life non-CAS CX (the hook for the other keys works fine but doesn't capture keypad presses). Would you guess that this is an issue with the hook address or the hardware (my real-life calculator is the P-0811C model) ?
User avatar
MishaShapo
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 68%
 
Posts: 17
Joined: 06 May 2016, 04:58
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Ndless KeyListener

Unread postby Adriweb » 09 May 2016, 23:07

MishaShapo wrote:Vogtinator showed me and the USB-port communicating capbilites of the Lua ASI API all while running this in the background so that my teacher can continue to use her calculator as normal. Could you give me some pointers on where to start ? Thank you. :)

Well, I could help you in Nspire-Lua in general, but I haven't done much about specific ASI stuff (yet?) :P, although Jim Bauwens, for instance has.
Here is a thermometer script he's come up with: archives_voir.php?id=440541


In fact, we've newsed about cool things about all that, see for example:
- viewtopic.php?t=17981
- viewtopic.php?t=17984
- viewtopic.php?t=17996

Hopefully we'll be able to get our hands on a TI-Innovator device at some point (after all, it's what TI had mainly in mind with their USB stuff on the CE and Nspire CX series OS recent and upcoming updates), and more ASI-using scripts should arise...

In the meantime, feel free to look around in the source code of all this, it should be helpful (even though the API documentation isn't bad already - but now there's at least an example)

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.7%
 
Posts: 14820
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

Re: Ndless KeyListener

Unread postby MishaShapo » 11 May 2016, 13:47

Thanks for the links, Adriweb. I already saw Jim Bauwen's Arduino example (and I succeeded in creating my own too through spoofing the VID/PID and using a CDC bootloader from the LUFA project). But the other links are very helpful.

For this current project though, I really need the keylistener to run in the background. Vogtinator's hooks work on the CAS CX 4.2 and, well, that's good enough for me now. I don't have any other projects in mind for now, but I think I might revisit Ndless once I actually have my degree in Computer Science (I am going to my first year of university this fall) so that I actually know enough about operating systems and stuff.
User avatar
MishaShapo
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 68%
 
Posts: 17
Joined: 06 May 2016, 04:58
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Ndless KeyListener

Unread postby MishaShapo » 13 May 2016, 01:13

Vogtinator, would you please be able to find out the hooks for the CX CAS 4.2 touchpad (like when the user uses the touch sensitive little box to move the cursor)?

Thank you so much!! =)
User avatar
MishaShapo
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 68%
 
Posts: 17
Joined: 06 May 2016, 04:58
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: Ndless KeyListener

Unread postby Vogtinator » 13 May 2016, 19:50

0x1022F834 on 4.2 CX CAS is eqivalent to 0x1022F40C on 4.2 CX.
User avatar
VogtinatorPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 1.6%
 
Posts: 217
Joined: 29 Mar 2014, 15:55
Gender: Male
Calculator(s):
MyCalcs profile

Re: Ndless KeyListener

Unread postby MishaShapo » 16 May 2016, 02:47

Hey, Vogtinator, thanks for the hooks. I haven't gotten a chance to try them yet because of school, but I will try them soon.
User avatar
MishaShapo
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 68%
 
Posts: 17
Joined: 06 May 2016, 04:58
Gender: Not specified
Calculator(s):
MyCalcs profile

Previous

Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 11 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1520 utilisateurs:
>1503 invités
>10 membres
>7 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)