Tutor App
Reply | Flag | Categorize
Xeda Elnara 02 Feb 2013 15:59
Xeda Elnara

Moderator

FA

Guest

I have started working on an application that will hopefully evolve to provide on-calc tutorials. Currently it has an example to show the user how to create a simple Hello World program. Here is a screenshot:
index.php?action=dlattach;topic=15662.0;attach=14627;image
The "tutorials" are basically a sequence of keypresses that get simulated. As well, I have added in some commands to interact with the user so you can actually step the user through the process and give them notifications about what is going on. Once I add in a menu, I will release the app and source so that others can create tutorials and submit them for the official release.

My goal is to cover all of the commands and I will probably need a separate version to work with mathprint. As well as all of the commands, there will be tutorials for different aspects of programming and it will be possible to have tutorials outside the app (probably as appvars). The current command available for making a tutorial are:

/=====================\
|    Key(val)         | 1 byte
\=====================/
  This is the main command. This tells the engine which key to
simulate. For example, to simulate [ENTER], use Key(skEnter).
/=====================\
|    Delay(val)       | 2 bytes
\=====================/
  This sets the delay between simulated key presses. I find 30
to work well.
/=====================\
|    Text(y,x,string) | 4 bytes + length of string
\=====================/
  This is how you communicate to the user. This is like the
BASIC command, except it draws over whatever is on the LCD, not
just the graph screen. For the worried, this does not affect the
contents of the graph screen. So for example:
     Text(56,0,"Hello World!")
/=====================\
|    WaitForKey(key)  | 2 bytes
\=====================/
  This waits for the user to press the appropriate key. When the
user presses the key, it will be registered. No other keys
respond while waiting.
/=====================\
|    Repeat(key,num)  | 3 bytes
\=====================/
  This will simulate a key press a number of times in a row.
This is useful for navigating menus to get to an item.
/=====================\
|    ExitTutor()      | 1 byte
\=====================/
  This ends the tutorial and normal OS stuff resumes.

  These commands should be enough for most tasks. However, if
there are more commands for the adventurous:
/=====================\
|    SetAns(num)      |
\=====================/
  This will set the "Ans" variable to the specified value. Note
that this whole program works with 1-byte values, 0 to 255.
/=====================\
|    TestAnsEqu(num)  |
\=====================/
  If 'Ans' is equal to 'num', then 'Ans' is set to 1, else it
is set to 0.
/=====================\
|    GetKey(num)      |
\=====================/
  Stores the user's keypress to Ans. This isn't as responsive
as it could be, yet, but it works.
/=============================\
|    JumpIfAnsEqu(num,label)  |  4 bytes
\=============================/
  This will jump to a label if Ans=num. Note that the label must
be on the same flash page.
/=====================\
|    PushAns()        |
\=====================/
  This pushes Ans onto a stack for later retrieval with
PopAns(). The stack is currently 240 bytes, but it may be
smaller in the future.
/=====================\
|    PopAns()         |
\=====================/
  This removes the last value on the stack and stores it to
'Ans'.

Hopefully I will make a lot of progress on this project, but I also have several other big projects that I am working on. I think that once menus are finished, the rest will be easy.

Attachment:

Roguebantha 04 Feb 2013 15:19
Roguebantha

Included page "member:roguebantha" does not exist (create it now)


Guest

That's really cool! :D

Attachment:

Xeda Elnara 04 Feb 2013 18:34
Xeda Elnara

Moderator

FA

Guest

Thanks! Hopefully I will get some more time in the near future to work on it :) I started adding in a menu, but you currently cannot select anything. It just draws the menu and you can move the selector thing. I need to add in scrolling for menus that are too large for one screen and I need to add in the ability to open sub-menus and then I can start going through the catalog and making tutorials XD

Another neat idea that I thought of doing was maybe if you are in a menu (like the Math menu) and you want to see how a command works, you can press ON and it starts the appropriate tutorial.

Attachment:

Make a reply:

To use the style buttons, click on the one you want, then press Ctrl+V.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License