// defining the buttons on the shipped-with remote control
#define REMOTE_ERROR -2
#define REMOTE_REPEAT -3
#define REMOTE_POWER 69
#define REMOTE_MENU 71
#define REMOTE_TEST 68
#define REMOTE_PLUS 64
#define REMOTE_BACK 67
#define REMOTE_REWIND 7
#define REMOTE_PLAY 21
#define REMOTE_FF 9
#define REMOTE_0 22
#define REMOTE_MINUS 25
#define REMOTE_C 13
#define REMOTE_1 12
#define REMOTE_2 24
#define REMOTE_3 94
#define REMOTE_4 8
#define REMOTE_5 28
#define REMOTE_6 90
#define REMOTE_7 66
#define REMOTE_8 82
#define REMOTE_9 74
Does any one know if these are use somewhere? Are they dead declarations in the code? They do not seem to correspond with the IR remote codes in the “Restore_Default” scratch.
No idea.
I ran this simple sketch to print the remote code received from each button & it’s exactly as per the button map in “Restore Default” map.
[code]#include <Sparki.h> // include the sparki library
void setup()
{
sparki.clearLCD();
}
void loop()
{
int code = sparki.readIR();
if(code != -1){
sparki.print("Received code: ");
sparki.println(code);
}
sparki.updateLCD();
}[/code]
It looks like the definitions in the .h are for a completely different remote, with the aim to be able to program spark from it??? I’m really not sure.
Yea, it looks like even the labels (such as REMOTE_PLAY, REMOTE_REWIND, etc) do not refer to the remote that was shipped with the unit. When I created the “Restore_Default” map, I used exactly what was coded in the program. If these codes are bogus, we should define the sets we have and remove these from the '.h" file. It’s confusing to have it around. I’m trying to add comments on both the sparki.cpp and .h files to have a clear understanding of what the code does and perhaps map the functions out to a hardware block diagram.
These are for a much older remote, and aren’t meant to be used. They’re just there because they haven’t been taken out yet (which is why they’re not documented or listed anywhere).