![]() TI‑Nspire™ CX Handheld: Hold down the c key and press If your program becomes unresponsive while running: To type relational operators such as =, <, and ≤, press / =. To clear the current line of code, press / Ì. ”) in places that require straight quotes ("."). Ĭode from an external source might contain "curly" quotation marks ( “.Tips for Coding with TI‑Nspire™ CX Technology To test the command, follow the previous instructions for running a program. To complete the command, Type 2 as the TIME value. Select Send "SET, and then select SOUND to insert the first part of the command. Position the cursor where you want to place the command. Open (or create) the program that you will use to communicate with the Hub. ![]() This TI‑Nspire™ CX example builds the command Send "SET SOUND 440 TIME 2" to sound a 440Hz tone for 2 seconds on the on-board speaker. Some parameters are optional, and you might need to know the value range of a parameter. The command parameters that apply to the component, such as sound frequency and duration. The unique name of the component that you are addressing, such as "SOUND" for the on-board speaker. Note: To build a command from the Hub menu, you need to know: It can save you time building commands and help you with correct command spelling and syntax. The Hub menu is available on the TI‑Nspire™ CX technology anytime you are creating or editing a program. The program appears in a Program Editor page. Select the program name name from the displayed list. On the Calculator menu, click Functions & Programs > Program Editor > Open. On the handheld, press b and select Functions & Programs > Program Editor > Open. If necessary, open the document that contains the program. If the program requires arguments, enclose them in the parentheses, separated by commas. On a Calculator page, type the program name and parentheses. Open the document that contains the program. To Run the Program: 1.Įnsure that the TI‑Innovator™ Hub is connected to your handheld or computer.Įnsure that any needed I/O Modules or Breadboard components are connected to the Hub. If you have made changes since storing the program, you are prompted to Check Syntax & Store. On the Program Editor menu, click Actions > Close. On the handheld, press b and select Actions > Close. On the Program Editor menu, click Check Syntax & Store > Check Syntax & Store. On the handheld, press b and select Check Syntax & Store > Check Syntax & Store. ![]() You must store your program before you can run it. Use the arrow keys to scroll through the program. You can either type command names or insert them from the Program Editor menu.Īfter typing each line, press Enter to type additional code. 3.īetween the Prgm and EndPrgm lines, type the lines of code that make up your program. The Program Editor opens, displaying a template for your program code. Type a name for your program, such as "soundtst," select Program as the Type, and then click OK. On the handheld, press ~ and select Insert > Program Editor > New.įrom the computer software, click Insert > Program Editor > New. To Create a New Program in a TI‑Nspire CX Document: 1. On computers running TI‑Nspire™ CX software, use the Help menu to update the software. On TI‑Nspire™ CX handhelds, use TI‑Nspire™ computer software to update the Operating System. Refer to System Requirements ( here), and update your software as needed. For detailed instructions, refer to the TI‑Nspire™ CX Program Editor. Note: These are abbreviated instructions. The commands are contained in a "For.EndFor" loop that repeats the ON/OFF blink cycle for 10 iterations. The following TI‑Nspire™ CX program uses the Send and Wait commands to blink the on-board red LED in the Hub. Read and display the current value of the on-board light sensor ("BRIGHTNESS"). Turn on blue element of on-board RGB LED ("COLOR") at 100% brightness. Play a 440Hz tone on the on-board speaker ("SOUND") for 2 seconds. Wait - Pauses program execution for a specified number of seconds. Valid only within Send, Get, and GetStr commands. Get and GetStr - Retrieve information requested from the Hub.Įval() - Supplies the result of an expression as a character string. Send - Sends command strings to the Hub to control devices or request information. The TI‑Innovator™ Hub responds to TI Basic programming commands such as Send and Get. For similar instructions for TI CE graphing calculator, refer to Hub Programming on TI CE Graphing Calculator ( here). Note: These instructions apply to TI‑Nspire™ CX technology. You are here: TI-Innovator™ Hub with TI LaunchPad™ Board Getting Started Guide > Code Examples: TI-Nspire™ CX Technology Hub Programming on TI‑Nspire™ CX Technology
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |