Cant get any input to work on the 83-plus. Any help would be great ^^
Posted: Sat Dec 17, 2011 11:45 pm
So I decided to have a go at trying to write a few programs for my calculator so as to learn more about low(er)-level coding, as normally I only do C++.
I have a TI-83-plus and therefore this is what I'm trying to code for.
I've managed to compile hello world and I am using this command:
"zcc +ti8xansi -startup=2 -create-app -o test test.c".
I wall really happy with that, however next I'd like to try and make a simple game.
So I've been trying to get input.h to do something but with no luck.
This was my attempt:
#include <stdio.h>
#include <input.h>
extern char in_KeyDebounce(50000);
extern char in_KeyStartRepeat(50001);
extern char in_KeyRepeatPeriod(50002);
extern int in_KbdState(50003);
int main()
{
in_GetKeyReset();
//int test;
//scanf("%d",&test);
printf("Hello!");
return 0;
}
This gives "Module 'TEST', Symbol not defined Error in expression IN_GETKEYRESET"
I also tried:
#include <stdio.h>
#include <input.h>
uchar in_KeyDebounce = 1; // no debouncing
uchar in_KeyStartRepeat = 20; // wait 20/50s before key starts repeating
uchar in_KeyRepeatPeriod = 10; // repeat every 10/50s
uint in_KbdState; // reserved
int main()
{
in_GetKeyReset();
//int test;
//scanf("%d",&test);
printf("Hello!");
return 0;
}
But I get the same error.
I'm really not sure about alot of this and I can't find many example of how to do this.
If someone could fix this code, post some example code or even just give me some pointers that would be great.
Thank you.
Also a little unrelated, but when I use "extern char in_KeyDebounce(50000);" is this actually declared in another file? Where am I externing it from? And the number in () is the memory location right? And it has to be at the start of a block?
I have a TI-83-plus and therefore this is what I'm trying to code for.
I've managed to compile hello world and I am using this command:
"zcc +ti8xansi -startup=2 -create-app -o test test.c".
I wall really happy with that, however next I'd like to try and make a simple game.
So I've been trying to get input.h to do something but with no luck.
This was my attempt:
#include <stdio.h>
#include <input.h>
extern char in_KeyDebounce(50000);
extern char in_KeyStartRepeat(50001);
extern char in_KeyRepeatPeriod(50002);
extern int in_KbdState(50003);
int main()
{
in_GetKeyReset();
//int test;
//scanf("%d",&test);
printf("Hello!");
return 0;
}
This gives "Module 'TEST', Symbol not defined Error in expression IN_GETKEYRESET"
I also tried:
#include <stdio.h>
#include <input.h>
uchar in_KeyDebounce = 1; // no debouncing
uchar in_KeyStartRepeat = 20; // wait 20/50s before key starts repeating
uchar in_KeyRepeatPeriod = 10; // repeat every 10/50s
uint in_KbdState; // reserved
int main()
{
in_GetKeyReset();
//int test;
//scanf("%d",&test);
printf("Hello!");
return 0;
}
But I get the same error.
I'm really not sure about alot of this and I can't find many example of how to do this.
If someone could fix this code, post some example code or even just give me some pointers that would be great.
Thank you.
Also a little unrelated, but when I use "extern char in_KeyDebounce(50000);" is this actually declared in another file? Where am I externing it from? And the number in () is the memory location right? And it has to be at the start of a block?