hey guys, I'm using an ID-12 RFID reader to read out tags. once two have been identified the program has to show a "challenge"they can do. at that point two buttons should appear. A fulfilled and a pass button. after trying to understand the example on processing about buttons and other Google searches is still do not understand the easiest way to make a button a know which one of the two was pressed or where i should but that into my code.... i want the buttons to appear in my void showChallenge.... any tips/ advise/ help?
// import the serial library:
import processing.serial.*;
Serial myPort; // the serial port you're using
String tagID = ""; // the string for the tag ID
String previousTagID = "" ;
int challengeNum = 0;
int maxChallenges = 12;
String[] challengeArray = {
"Each person cooking can choose an ingredient to cook with", // Challenge 1
"The eldest child can choose a parent to cook with", // Challenge 2
"The children can go to the supermakret and cook dinner with the help of a parent", // Challenge 3
"Have fun, eat somewhere els then at the dinner table", // Challenge 4
"The youngest member of the family has to choose a parent to cook dinner with", // Challenge 5
"Have a family meal fallowed by a night which can include a movie night", // Challenge 6
"The youngest child can choose a cake to bake for desert", // Challenge 7
"Cook a three course meal wich consists of an entré, a main course and a dessert", // Challenge 8
"Cook something you have not eaten before", // Challenge 9
"Use an ingredient you have not used before", // Challenge 10
"Create your own recipe wih at least two children and give it a name", // Challenge 11
"Cook with at least three family members"// Challenge 12
};
int[] challengeScores = {
8, // Challenge 1
8, // Challenge 2
11, // Challenge 3
16, // Challenge 4
8, // Challenge 5
25, // Challenge 6
7, // Challenge 7
11, // Challenge 8
6, // Challenge 9
3, // Challenge 10
12, // Challenge 11
13, // Challenge 12
};
String[] rewardArray = {
"You can choose a parent to give you breakfast in bed", // Reward 1
"You can choose where to go for dinner", // Reward 2
"You can choose wat is for breakfast this Saturday or Sunday", // Reward 3
"You can choose what to eat for dinner", // Reward 4
"You do not have to do the dishes", // Reward 5
"You can choose what to have for dessert", // Reward 6