CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: Yuki on February 16, 2016, 05:32:21 PM

Title: TI-Nspire OS 4.2 released
Post by: Yuki on February 16, 2016, 05:32:21 PM
(https://i.imgur.com/mzVNdOm.png)

Bit of a bad news today, as with most TI-Nspire OS releases, the newest OS 4.2 is out for release as of today. Same Boot1 and Boot2, but among the new features we have new IO functions (Get, GetStr and Send) and, most importantly, as you can guess by now, it blocks Ndless 4.0.3, as released last month, without any way to downgrade.

So in short, as we say almost every release of the OS...

DO NOT INSTALL THE NEW NSPIRE OS 4.2 IF YOU WANT NDLESS.

Well, until a new version of Ndless fixes it all. (EDIT 19/02/2016: Which is coming soon already?)

Source: https://tiplanet.org/forum/viewtopic.php?t=17963
Title: Re: TI-Nspire OS 4.2 released
Post by: Dudeman313 on February 16, 2016, 05:35:21 PM
Only one thing to say...
https://www.youtube.com/watch?v=R2RmzwZNXfk (https://www.youtube.com/watch?v=R2RmzwZNXfk)
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 16, 2016, 05:37:49 PM
Dang I wanted to post the news. It was gonna be a copycat of the OS 4.0 news with some strikethroughs with small replacements next to them, because that's pretty much what this OS is, and I'm not surprised it comes out right after Ndless 4.0.3. I'm betting 4.2 was not supposed to come out before next school year, but that Ndless 4.0.3 made TI rush it to the market.


Also this OS might be problematic in France, because in June 2015, many French teachers who monitored exams tried to instate their own laws and restrictions during exams, such as disallowing students from using their Nspire CX calc to view documents even though they were allowed to and worse. 
Title: Re: TI-Nspire OS 4.2 released
Post by: Yuki on February 16, 2016, 05:40:24 PM
Heh, feel free to edit mine :P
Title: Re: TI-Nspire OS 4.2 released
Post by: GalacticPirate on February 16, 2016, 05:41:21 PM
And new functions in the I/O prog menu, Get, GetStr, and Send :p
Also the bug with quotation marks in strings in programs is corrected :p
Title: Re: TI-Nspire OS 4.2 released
Post by: Dudeman313 on February 16, 2016, 05:42:39 PM
Quote from: STV on February 16, 2016, 05:41:21 PM
And new functions in the I/O prog menu, Get, GetStr, and Send :P
That's already up there. :P
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 16, 2016, 05:46:44 PM
Quote from: STV on February 16, 2016, 05:41:21 PM
And new functions in the I/O prog menu, Get, GetStr, and Send :p
Also the bug with quotation marks in strings in programs is corrected :p
Wait, they fixed a bug? O.O That's usually rare, because OS 3.6 still had bugs dating all the way back in OS 1.1 or so.

As for Get/GetStr/Send, do they also work while the other calculator is busy doing stuff? (for example, inside a For loop) On the 83+ series, GetCalc stopped working if the other calculator was busy and only worked if it was Paused or not inside a program.
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on February 16, 2016, 05:54:04 PM
Do the new IO functions work in lua? Because if so I am definately upgrading(I dont really use any ndless apps except for ndoom and nclock and many other apps crash/reset my calc anyways). Also how are they used? Are they just for calc to calc or can you communicate between the nspire and a computer or some other device?
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 16, 2016, 06:06:57 PM
They are new TI-BASIC commands.
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on February 16, 2016, 06:47:20 PM
Eh then its not really worth it. I'm going to stick with os 4.0.3 for now.
Also are there any other changes(and where can I see the list of them) made with the new os?
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 16, 2016, 07:08:19 PM
Critor just reported that there is now a Wait command, to add a pause of a few seconds to the program. Kinda like on the HP Prime.

https://tiplanet.org/forum/viewtopic.php?f=43&t=17963&p=197083#p197082

There is no changelog yet. Maybe there will be one at T3?
Title: Re: TI-Nspire OS 4.2 released
Post by: Adriweb on February 16, 2016, 07:14:46 PM
Well, there is a changelog page, although as usual they don't tell everything :P
https://education.ti.com/en/us/whats-new
Title: Re: TI-Nspire OS 4.2 released
Post by: Yuki on February 16, 2016, 07:19:39 PM
They tell what's interesting in math courses and that's it, so teachers can understand what new they can teach. Nothing about the boring internals nobody cares about. (except us power users of course :P)
Title: Re: TI-Nspire OS 4.2 released
Post by: Adriweb on February 16, 2016, 07:47:59 PM
The new Lua stuff I've seen are detailed here: https://tiplanet.org/forum/viewtopic.php?p=197086#p197086 (some new things, but mainly USB ("asi") related stuff)
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on February 16, 2016, 07:54:44 PM
Will these changes be added to the ti nspire lua reference guide?
Title: Re: TI-Nspire OS 4.2 released
Post by: Adriweb on February 16, 2016, 07:55:45 PM
Probably, but for now it's not updated yet.
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 16, 2016, 08:17:40 PM
Thanks for the two links Adriweb :)
Title: Re: TI-Nspire OS 4.2 released
Post by: critor on February 16, 2016, 11:05:32 PM
The guidebook is giving some examples to use the new send/get commands, with a mysterious USB interface device for now :



- read the state of a green LED :
Send "READ GREEN 1"
Get green1

or
Get "READ GREEN 1", green1



- Turn on a green LED for 0.5sec before turning it off :
Send "SET GREEN 1 ON"
Wait 0.5
Send "SET GREEN 1 OFF"




So the new device seems to be something relatively complex, as being able to understand some kind of a script language. ;)

Source : https://tiplanet.org/forum/viewtopic.php?p=197089#p197089
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 16, 2016, 11:17:36 PM
Can they be used to send files between two calculators?
Title: Re: TI-Nspire OS 4.2 released
Post by: critor on February 17, 2016, 08:03:00 AM
I don't. We would first need to discover what's the new USB device by TI.

For example, here's the never heard of TI-Nspire DataTracker cradle which has just been discovered and adds 3 USB ports to the TI-Nspire :
(https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=456&image_id=6575) (https://tiplanet.org/forum/gallery/image_page.php?album_id=456&image_id=6575) (https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=456&image_id=6574) (https://tiplanet.org/forum/gallery/image_page.php?album_id=456&image_id=6574) (https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=456&image_id=6571) (https://tiplanet.org/forum/gallery/image_page.php?album_id=456&image_id=6571)

Source : https://tiplanet.org/forum/viewtopic.php?t=17966&p=197095#p197095
Title: Re: TI-Nspire OS 4.2 released
Post by: alexgt on February 17, 2016, 02:50:04 PM
Well, this sucks... it sounds like the new  commands would be cool for Basic programmers, not that really anyone uses Nspire BASIC :P
Title: Re: TI-Nspire OS 4.2 released
Post by: critor on February 17, 2016, 02:59:04 PM
Who said it didn't work in Lua ? ;)
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on February 17, 2016, 03:57:37 PM
Quote from: critor on February 17, 2016, 08:03:00 AM
I don't. We would first need to discover what's the new USB device by TI.

For example, here's the never heard of TI-Nspire DataTracker cradle which has just been discovered and adds 3 USB ports to the TI-Nspire :
(https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=456&image_id=6575) (https://tiplanet.org/forum/gallery/image_page.php?album_id=456&image_id=6575) (https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=456&image_id=6574) (https://tiplanet.org/forum/gallery/image_page.php?album_id=456&image_id=6574) (https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=456&image_id=6571) (https://tiplanet.org/forum/gallery/image_page.php?album_id=456&image_id=6571)

Source : https://tiplanet.org/forum/viewtopic.php?t=17966&p=197095#p197095

Would anyone actually buy this though? Cause it seems really obscure and expensive.
Title: Re: TI-Nspire OS 4.2 released
Post by: GalacticPirate on February 17, 2016, 04:01:59 PM
Actually this is old and discontinued  O.O
Title: Re: TI-Nspire OS 4.2 released
Post by: aetios on February 17, 2016, 04:07:31 PM
Darn that looks pretty cool. Inb4 they release a ps3 controller adapter :trollface:
Title: Re: TI-Nspire OS 4.2 released
Post by: Adriweb on February 19, 2016, 04:18:56 AM
Nspire-Lua API 4.2 Documentation/Guidebook (https://education.ti.com/en/us/~/media/Files/Download%20Center/Guidebooks/ti-nspire/4.2/TI-Nspire%20Lua%20Scripting%20API%20Reference%20Guide/TI-Nspire%20Lua%20Scripting%20API%20Reference%20Guide.pdf)

The ASI ("Asynchronous Serial Interface") things are more exciting than I thought - it looks like it allows to talk to any serial device correctly communicating with the Nspire/computer :)

So yeah, any board, Arduino etc. will work.

Woohoo ! Thanks TI for listening :)
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 19, 2016, 06:06:10 AM
On an off-topic note, contrats @critor for the ticalc.org news position.  I think the community will benefit a lot from this, since you know so much about new calculators and releases O.O

Also nice discovery Adriweb :D. I wonder if this means that the Nspire CX is now more open? (even if not Ndlessable yet)
Title: Re: TI-Nspire OS 4.2 released
Post by: Lionel Debroux on February 19, 2016, 08:33:20 AM
We'll see what their serial device interface is precisely. There's a standard USB class which can be used for serial communications (CDC), but the usual USB serial chips (FTDI-232, CP210x, PL2303, etc.) use vendor-specific class.
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on February 19, 2016, 05:10:56 PM
Are there any pictures of it being connected to an arduino?
How would you hook it up and are there any pinouts for the serial port to show which pins can be used for serial and which ones shouldnt be touched?
Noob questions and I know they havent been answered yet, but when an answer comes that would be great.
Title: Re: TI-Nspire OS 4.2 released
Post by: Adriweb on February 20, 2016, 05:56:58 AM
Regarding the new OS 4.2 Nspire-Lua APIs mentioned in the updated documentation, mainly the ASI (Asynchronous Serial Interface), I've hooked up an Arduino Uno to my computer and quickly wrote a script (https://tiplanet.org/forum/viewtopic.php?p=197268#p197268) on TINCS using those APIs to interact with it a bit, and anyway, it works:

(https://i.imgur.com/n5g9TT4.png)
(https://i.imgur.com/fYgQL6P.png)
(https://i.imgur.com/OarNK9xm.png) (https://i.imgur.com/OarNK9x.png)

Jim Bauwens' tests show that the handheld isn't as happy, though (but doesn't blatantly say that the plugged in peripheral isn't compatible either, as it's been the cases before...), so we'll know more about compatibility during the T3 conference...
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on February 20, 2016, 06:17:59 AM
That is cool Adriweb. Too bad Jim's tests weren't so positive about the Handheld behavior, though. Hopefully T3 explains more into details what is the use of this new functionality and hopefully it's not too crippled.
Title: Re: TI-Nspire OS 4.2 released
Post by: critor on February 20, 2016, 10:58:55 AM
A TI card doesn't work better - same problem as you with a TI-LaunchPad Stellaris LM4F120.

Detected as COM9 on computer with the TI-Nspire 4.2 teacher software : :)
(https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=63&image_id=6577) (https://tiplanet.org/forum/gallery/image_page.php?image_id=6577)

With the same Lua code (https://tiplanet.org/forum/viewtopic.php?t=17965&p=197286#p197286) on a TI-Nspire CX 4.2, not detected at all although powered by the calculator : :'(
(https://tiplanet.org/forum/gallery/image.php?mode=thumbnail&album_id=63&image_id=6578) (https://tiplanet.org/forum/gallery/image_page.php?image_id=6578)
Title: Re: TI-Nspire OS 4.2 released
Post by: Jim Bauwens on February 21, 2016, 06:21:21 PM
My CX CAS is now a thermometer :)

(http://i.imgur.com/8Q0QPmi.jpg)

Yesterday Critor was testing multiple boards and noticed that a TI-LaunchPad MSP-EXP432P401R was detected by his device (see https://tiplanet.org/forum/viewtopic.php?t=17981&p=197316#p197316). As the launchpad is just a USB CDC device, I thought that it was a bit odd that my Arduino did not want to work. So I decided to try and copy the VID en PID (device identifiers) of his Launchpad and fake it on my Leonardo. And that worked, the leonardo was recognized by my handheld! Testing showed that communication worked, so with a little bit of work I made this.
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on March 28, 2016, 04:30:31 AM
Hey @Jim Bauwens I don't know how I missed this, but this might have been due to the activity we had at one point last month (lots of topics) and me still being busy. This is an awesome mod you got there. Maybe it should have been in its separate topic since it's quite cool :) (plus maybe show how it was made so that maybe other students would like to build their own TI-Nspire thermometers :) )
Title: Re: TI-Nspire OS 4.2 released
Post by: Jim Bauwens on March 28, 2016, 08:26:07 AM
Thanks :) I uploaded an archive with source code and instructions to ticalc.org: http://www.ticalc.org/archives/files/fileinfo/466/46659.html .
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on March 28, 2016, 08:00:39 PM
Yay! Hopefully people use this :)
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on April 02, 2016, 11:33:43 PM
I have an arduino micro and I tried hooking it up. Unfortunately, I do not have a temperature sensor so I just copied over your code, but instead of sending a temperature value, I send over a ping distance. The program works with the computer, and my calculator powers my micro, but I cannot get the calculator to communicate with my micro. I tried changing the vid and pin of my micro to match what you specified, but I am not sure I did it correctly. Do you have any suggestions as for how to connect my arduino?
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on April 02, 2016, 11:36:55 PM
Heya semiprocoder, nice to see you again on CW :3=

Hopefully someone who has experience with Nspire+Arduino stuff can help you *pokes Adriweb and the others*
Title: Re: TI-Nspire OS 4.2 released
Post by: Jim Bauwens on April 03, 2016, 11:34:38 AM
Quote from: semiprocoder on April 02, 2016, 11:33:43 PM
I have an arduino micro and I tried hooking it up. Unfortunately, I do not have a temperature sensor so I just copied over your code, but instead of sending a temperature value, I send over a ping distance. The program works with the computer, and my calculator powers my micro, but I cannot get the calculator to communicate with my micro. I tried changing the vid and pin of my micro to match what you specified, but I am not sure I did it correctly. Do you have any suggestions as for how to connect my arduino?

Could you post the appropriate (micro) section of your boards.txt?
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on April 03, 2016, 02:36:35 PM
I tried making pin0 and vid0 the modified values, and then I just tried making everything the modified values(I dont know how this works so I was just guessing at what to do). Heres what it is right now:


micro.name=Arduino/Genuino Micro

micro.vid.0=0x0451
micro.pid.0=0xBEF3
micro.vid.1=0x0451micro.pid.1=0xBEF3
micro.vid.2=0x0451
micro.pid.2=0xBEF3micro.vid.3=0x0451
micro.pid.3=0xBEF3

micro.vid.4=0x0451
micro.pid.4=0xBEF3

# If the board is a 2341:0237 use 2341:8237 for build and set
# other parameters as well
micro.vid.4.build.vid=0x2341
micro.vid.4.build.pid=0x8237
micro.vid.4.build.usb_product="Genuino Micro"
micro.vid.4.bootloader.file=caterina/Caterina-Genuino-Micro.hex

micro.vid.5=0x2341
micro.pid.5=0x8237
# If the board is a 2341:8237 use 2341:8237 for build and set
# other paramters as well
micro.vid.5.build.vid=0x2341
micro.vid.5.build.pid=0x8237
micro.vid.5.build.usb_product="Genuino Micro"
micro.vid.5.bootloader.file=caterina/Caterina-Genuino-Micro.hex

micro.upload.tool=avrdude
micro.upload.protocol=avr109
micro.upload.maximum_size=28672
micro.upload.maximum_data_size=2560
micro.upload.speed=57600
micro.upload.disable_flushing=true
micro.upload.use_1200bps_touch=true
micro.upload.wait_for_upload_port=true

micro.bootloader.tool=avrdude
micro.bootloader.low_fuses=0xff
micro.bootloader.high_fuses=0xd8
micro.bootloader.extended_fuses=0xcb
micro.bootloader.file=caterina/Caterina-Micro.hex
micro.bootloader.unlock_bits=0x3F
micro.bootloader.lock_bits=0x2F

micro.build.mcu=atmega32u4
micro.build.f_cpu=16000000L
micro.build.vid=0x2341
micro.build.pid=0x8037
micro.build.usb_product="Arduino Micro"
micro.build.board=AVR_MICRO
micro.build.core=arduino
micro.build.variant=micro
micro.build.extra_flags={build.usb_flags}
[\code]
Title: Re: TI-Nspire OS 4.2 released
Post by: Jim Bauwens on April 03, 2016, 08:10:59 PM
You need to update the build params too, for my Leonardo I use:

leonardo.build.vid=0x0451
leonardo.build.pid=0xBEF3
Title: Re: TI-Nspire OS 4.2 released
Post by: Lionel Debroux on April 03, 2016, 08:51:21 PM
And you can check the USB VID:PID exposed to the host by the device. On Linux, through `lsusb`; on Windows, e.g. through the Devices Manager; etc.
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on April 03, 2016, 08:52:19 PM
Do you know how to do this with a due? Cause someone asked me for my micro, and I gave it to them to use for a while. I didn't see due anywhere in boards.txt.
Title: Re: TI-Nspire OS 4.2 released
Post by: Jim Bauwens on April 04, 2016, 09:51:57 AM
Quote from: semiprocoder on April 03, 2016, 08:52:19 PM
Do you know how to do this with a due? Cause someone asked me for my micro, and I gave it to them to use for a while. I didn't see due anywhere in boards.txt.

If there is no entry, then the Arduino software normally will not recognize it. Isn't there anything like this: https://raw.githubusercontent.com/arduino/Arduino/ide-1.5.x/hardware/arduino/sam/boards.txt ?
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on April 04, 2016, 11:24:58 PM
Sam wasnt available in arduino 1.6.5(the one I used previously). Thus I installed 1.5.6, and it did have the sam folder in arduino. Thus I changed boards.txt to:


arduino_due_x_dbg.name=Arduino Due (Programming Port)
arduino_due_x_dbg.vid.0=0x0451
arduino_due_x_dbg.pid.0=0xBEF3
arduino_due_x_dbg.upload.tool=bossac
arduino_due_x_dbg.upload.protocol=sam-ba
arduino_due_x_dbg.upload.maximum_size=524288
arduino_due_x_dbg.upload.use_1200bps_touch=true
arduino_due_x_dbg.upload.wait_for_upload_port=false
arduino_due_x_dbg.upload.native_usb=false
arduino_due_x_dbg.build.mcu=cortex-m3
arduino_due_x_dbg.build.f_cpu=84000000L
arduino_due_x_dbg.build.usb_product="Arduino Due"
arduino_due_x_dbg.build.board=SAM_DUE
arduino_due_x_dbg.build.core=arduino
arduino_due_x_dbg.build.extra_flags=-D__SAM3X8E__ -mthumb {build.usb_flags}
arduino_due_x_dbg.build.ldscript=linker_scripts/gcc/flash.ld
arduino_due_x_dbg.build.variant=arduino_due_x
arduino_due_x_dbg.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a
arduino_due_x_dbg.build.vid=0x0451
arduino_due_x_dbg.build.pid=0xBEF3

arduino_due_x.name=Arduino Due (Native USB Port)
arduino_due_x.vid.0=0x0451
arduino_due_x.pid.0=0xBEF3
arduino_due_x.upload.tool=bossac
arduino_due_x.upload.protocol=sam-ba
arduino_due_x.upload.maximum_size=524288
arduino_due_x.upload.use_1200bps_touch=true
arduino_due_x.upload.wait_for_upload_port=true
arduino_due_x.upload.native_usb=true
arduino_due_x.build.mcu=cortex-m3
arduino_due_x.build.f_cpu=84000000L
arduino_due_x.build.usb_product="Arduino Due"
arduino_due_x.build.board=SAM_DUE
arduino_due_x.build.core=arduino
arduino_due_x.build.extra_flags=-D__SAM3X8E__ -mthumb {build.usb_flags}
arduino_due_x.build.ldscript=linker_scripts/gcc/flash.ld
arduino_due_x.build.variant=arduino_due_x
arduino_due_x.build.variant_system_lib=libsam_sam3x8e_gcc_rel.a
arduino_due_x.build.vid=0x0451
arduino_due_x.build.pid=0xBEF3


That didn't work. Then I looked into the driver and went to a random folder in system32 containing arduino.inf. I changed the due vid and pin there as well, and it still did not do anything. My due still doesn't have the proper usb settings.[/code]
Title: Re: TI-Nspire OS 4.2 released
Post by: Jim Bauwens on April 05, 2016, 02:58:24 PM
Hmm, I wouldn't know then. The Due is quite a different platform than the Micro/Leonardo, it is possible that the firmware needs reflashing, but I'm not sure at all.
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on April 18, 2016, 02:32:10 AM
Well, I got my micro back,  and I am happy to report that it now communicates with my nspire!
Title: Re: TI-Nspire OS 4.2 released
Post by: Adriweb on April 18, 2016, 02:32:40 AM
nice :)
You should post code/photos/whatever :)
Title: Re: TI-Nspire OS 4.2 released
Post by: Dream of Omnimaga on April 18, 2016, 03:41:52 PM
Glad that you got it working Semiprocoder :)
Title: Re: TI-Nspire OS 4.2 released
Post by: semiprocoder on April 18, 2016, 11:35:06 PM
Quote from: Adriweb on April 18, 2016, 02:32:40 AM
nice :)
You should post code/photos/whatever :)
Well, this isnt really that good wiring, but anyways, here is a pic. It uses the same nspire code as was in the download for the example(without drawing the C for Celsius). Lastly, the arduino sends over a potentiometer analogRead value.
(http://i.imgur.com/yFAUH57.jpg)