Appendices Appendix 1: p.2-6 Gamekey and Gamedivider – information from Fontys Students Appendix 2: p.6, 7 Technology Before midterm – Arduino code 1 Appendix 3: p.8, 9 Technology Before midterm – Arduino code 2 Appendix 4: Observation Primary school
p.10
Appendix 5: Prototype form research
p.11, 12
Appendix 6: p.12-16 Technology After midterm – Arduino code 1 Appendix 7: p.16-20 Technology After midterm – Arduino code 2 Appendix 8: p.21-25 Technology After midterm – Arduino code 3 Appendix 9: p.25-30 Technology After midterm – Arduino code 4
Vital Play B2.1 S.W. Ebbers P. Goetstouwers B.S. Kock L.P.M. Roelofs 1
Appendix 1 Gamekey and Gamedivider – Information from Fontys students Stageweek
Datum
Basisopstelling (BO) BO
Onderdelen
Periode 2: “Organiseren in één hoek, betekenisvolle instructie, begeleiden” Gedurende de periode moeten de studenten een aantal momenten bewegen en muziek inplannen. Dit kan prima in één hoek plaats vinden, als inleiding of afsluiting!! Daarnaast maken ze video-opnames van zichzelf in (inter)actie met de kinderen. 11-111 Oriëntatie Observeren 13 12-11Oriëntatie Observeren 13
2
18-1113
19-1113
3
25-1113
26-1113
4
02-1213
03-1213
5
09-1113
10-1213
6
16-1213
17-1213
BO 04
BO 04
BO 07
BO 07
BO 08
BO 08
BO 09
BO 09
BO 11
BO 11
• • • • • • • • • • • • • • • • • • •
1 keer
Touwzwaaien Hurkwendsprong Agent en boeven Stoeien
1 keer
Klimmen klimraam / Touwklimmen Rollen op verhoogd vlak Doeljagerbal/2-partijentijgerbal Acrobatiek
1 keer
Klimmen klimraam / Touwklimmen Rollen op verhoogd vlak Doeljagerbal/2-partijentijgerbal Acrobatiek
1 keer
• • •
Zwaaien Mikken Tikspel Pietengym
Aanbod BAW
BO 07
Touwzwaaien Hurkwendsprong Agent en boeven Stoeien
Zwaaien Mikken Tikspel Pietengym
• • • • • • • • • • • • • • •
Evt. reden van (gedeeltelijke) afwijking programma
e
BO 08 e
e
BO 09 e
1 keer e
BO 11 1 keer e
Touwtje springen Duikelen aan de ringen Pylonvoetbal Glijden
1 keer
Touwtje springen Duikelen aan de ringen Pylonvoetbal Glijden
1 keer
Blanceren over smalle vlakken Zwaaien aan de ringen Inktvistikkertje Zwaaien aan de ringen
1 keer
Blanceren over smalle vlakken Zwaaien aan de ringen Inktvistikkertje
1 keer
e
BO 12 e
e
BO 13 e
2
• 24-1213 31-1213
7
06-0114
07-0114
8
13-0114
14-0114
Zwaaien aan de ringen
Kerstvakantie Kerstvakantie
• • • • • • • • • • • • • • • •
BO 12
BO 12
BO 13
BO 13
Hurkwendsprong Duikelen aan de rekstok Doeljagerbal/doelbal stoeien
1 keer
Hurkwendsprong Duikelen aan de rekstok Doeljagerbal/doelbal stoeien
1 keer
schommelen handstand en radslag agent en boeven/korfbal bewegen op muziek
1 keer
schommelen handstand en radslag agent en boeven/korfbal bewegen op muziek
1 keer
e
BO 01 e
e
Geen les e
Periode 3 (aanbod binnen de opleiding) De nadruk in periode 3 ligt voornamelijk op “Beter leren bewegen in één hoek, differentiatie op 3 niveaus in één hoek”, waarbij één student de verantwoordelijkheid heeft over één vak met de daarbij behorende differentiatie voor de onderdelen uit dat vak. De vermelde basisopstelling is in de lessen bewegingsagogische wetenschappen (BAW) op het niveau van groep 5/6 door één stagegroep uit de klas voorbereid. Vervolgens wordt er in de les per beweeghoek de differentiatie uitgewerkt, de mogelijkheden en aanpassingen naar andere groepen én de knelpunten van deze basisopstelling besproken. In deze periode komen alle basisopstellingen, die in de stage worden uitgevoerd in periode 3 en periode 4, uitgebreid aan bod. Periode 3: “Beter leren bewegen in één hoek, differentiatie op 3 niveaus in één hoek” Binnen deze periode moeten de studenten filmopnames maken van de kinderen binnen door hen voorbereide bewgingssituaties om te beoordelen of de gekozen BS, DS en OLS de juiste is ën hoe ze dit eventueel moeten aanpassen naar het juiste niveau. 9
10
11
12
03-02-14
BO 01
04-02-14
BO 01
10-02-14
BO 08
11-02-14
BO 08
17-02-14
BO 02
18-02-14
BO 02
24-02-14
BO 03
• • • • • • • • • • • • • • • • • • • • •
Afwijking programma
schommelen hurksprong hokbal
1 keer
schommelen hurksprong hokbal
1 keer
Zwaaien Mikken Tikspel
Verdieping (uit P2)
Zwaaien Mikken Tikspel
Verdieping (uit P2)
glijden en klimmen rollen op verhoogd vlak doeljagerbal klimmen en touwtjespringen
1 keer
glijden en klimmen rollen op verhoogd vlak doeljagerbal klimmen en touwtjespringen
1 keer
balanceren op smalle vlakken
1 keer
Aanbod BAW
e
BO 02
e
BO 03
e
BO 04 e
e
BO 06
3
25-02-14
13
10-03-14
11-03-14
14
17-03-14
18-03-14
15
24-03-14
25-03-14
16
31-03-14
01-04-14
BO 03
BO 04
BO 07
BO 06
BO 06
BO 02
BO 02
BO 07
BO 07
• • • • • • •
bergbeklimmen leeuwenkooi touwtjespringen en handstand(overslag)
balanceren op smalle vlakken bergbeklimmen leeuwenkooi touwtjespringen en handstand(overslag) Geen stage ivm voorjaars/crocus/carnavalsvakantie
• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
1 keer e
Touwzwaaien Hurkwendsprong Agent en boeven Stoeien
Verdieping (uit P2)
Klimmen klimraam / Touwklimmen Rollen op verhoogd vlak Doeljagerbal/2-partijentijgerbal Acrobatiek
Verdieping (uit P2)
Balanceren Verspringen en hoogspringen Raak en haal/2-partijenjagerbal Verspringen en hoogspringen
1 keer
Balanceren Verspringen en hoogspringen Raak en haal/2-partijenjagerbal Verspringen en hoogspringen
1 keer
glijden en klimmen rollen op verhoogd vlak doeljagerbal klimmen en touwtjespringen
Verdieping
glijden en klimmen rollen op verhoogd vlak doeljagerbal klimmen en touwtjespringen
Verdieping
Klimmen klimraam / Touwklimmen Rollen op verhoogd vlak Doeljagerbal/2-partijentijgerbal Acrobatiek
Verdieping
Klimmen klimraam / Touwklimmen Rollen op verhoogd vlak Doeljagerbal/2-partijentijgerbal Acrobatiek
Verdieping
BO 07
e
BO 13 e
BO 12
Geen les
Periode 4 (aanbod binnen de opleiding) Aanbod meer gestructureerd vanuit de docent FSH. Stagegroepen gaan lesgeven aan elkaar, waarbij alle didactische zaken (betekenisvolle uitleg, differentiatie, aanbieden van de juiste leerhulp, intensief, goede organisatie, terugkoppeling naar doelstellingen etc) die tot nu toe aan bod zijn gekomen, hierin terug komen en van feedback worden voorzien. Voor studenten is dit een soort van “beoordeelde stageles op de opleiding”. De lessen komen als zodanig niet terug in de stage daarde stagelessen allemaal al in periode 3 zijn voorbereid. Periode 4: “Beter leren bewegen in één hoek én aansturen van een andere hoek, differentiatie (3 niv.)” Mogelijkheid (in overleg met SLB/SPD) om af te wijken van de inhoud zoals beneden verwoord. Wellicht dat studenten een keer een “gave afsluitles” willen verzorgen of aansluiten op binnen de school besproken/levende thema’s. Geen stage ivm 2 Paasdag 17 21-04-14 Vrije invulling vanuit de verschillende 22-04-14 BO “Spel” basisopstellingen met SPEL e
“Vakantieles”
4
Meivakantie voor basisschool???? Wellicht niet voor elke school………
• • 18
05-05-14
•
BO 06
• • • 06-05-14
•
BO 06
•
19
12-05-14
13-05-14
20
19-05-14
20-05-14
21
26-05-14
22
02-06-14
03-06-14
23
24
09-06-14
Balanceren Verspringen en hoogspringen Raak en haal/2partijenjagerbal Verspringen en hoogspringen
BO 13
• • • •
schommelen handstand en radslag agent en boeven/korfbal bewegen op muziek
BO 13
• • • •
schommelen handstand en radslag agent en boeven/korfbal bewegen op muziek
BO 14
• • • •
Estafette Zwaaien aan de ringen Spel naar keuze Acrobatiek
• • • • •
BO 14
• • •
BO 03
• 27-05-14
Balanceren Verspringen en hoogspringen Raak en haal/2partijenjagerbal Verspringen en hoogspringen
• • •
BO 03
Estafette Zwaaien aan de ringen Spel naar keuze Acrobatiek balanceren op smalle vlakken bergbeklimmen leeuwenkooi touwtjespringen en handstand(overslag) balanceren op smalle vlakken bergbeklimmen leeuwenkooi touwtjespringen en handstand(overslag)
BO 09
• • • •
Touwtje springen Duikelen aan de ringen Pylonvoetbal Glijden
BO 09
• • • •
Touwtje springen Duikelen aan de ringen Pylonvoetbal Glijden
Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen
Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping (uit P2) Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping (uit P2) Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen Verdieping Eventueel voorgaande onderdelen uit een behandelde BO terug laten komen
Geen stage ivm 2 Pinksterdag e
• • • •
Hurkwendsprong Duikelen aan de rekstok Doeljagerbal/doelbal stoeien
10-06-14
BO 12
16-06-14
BO “Vrij”
“Vakantieles” / Afsluiting stage
17-06-14
BO “Vrij”
“Vakantieles” / Afsluiting stage
Verdieping
“Vakantieles” / Afsluiting stage “Vakantieles” /
5
Afsluiting stage Gemiste stagedagen worden ingehaald in de week/ op de data: zie ook kolom naast gemiste dagen; student die een dag(deel) mist kan dan naast/met de groepsleerkracht de les verzorgen, waarbij de student verantwoordelijk is voor het maken van de les en het LVF.
Naam schoolpracticumdocent Handtekening schoolpracticumdocent
Naam student Handtekening student
(naar waarheid ingevuld)
Appendix 2 Technology Before midterm – Arduino code 1 Mid-term_Mk06___Multi_Rand_RGB.ino //Pinmodes moeten PWM pinnen worden //HIGH - LOW values moeten omgeschreven worden naar PWM int button = 2; //button pin, connect to ground as button int ledPin9 = 9; // Changed from Setup to global + Changed from 4 to 9 For the Red int ledPin10 = 10; // Changed from Setup to global + Changed from 3 to 10 For the Green int ledPin11 = 11; // Changed from Setup to global + Changed from 5 to 11 For the Blue int ledPin3 = 3; int ledPin5 = 5; int ledPin6 = 6; int ledPinA0 = A0; int ledPinA1 = A1; int ledPinA2 = A2; int ledPinA3 = A3; int ledPinA4 = A4; int ledPinA5 = A5; //int press = 0; boolean LRed = false; boolean LGreen = true; boolean LBlue = false; int state = 0; void setup() 6
{ pinMode(button, INPUT); //arduino monitor pin state Serial.begin(9600); //talking to the server is possible } void loop() { int r[] = {0, 1, 2}; if (digitalRead(button) == HIGH) { while(digitalRead(button) == HIGH) { }//while holding the button the program will stay on this line analogWrite(ledPin3 , 0); analogWrite(ledPin5 , 0); analogWrite(ledPin6 , 0); analogWrite(ledPin9 , 0); analogWrite(ledPin10 , 0); analogWrite(ledPin11 , 0); analogWrite(ledPinA0 , 0); analogWrite(ledPinA1 , 0); analogWrite(ledPinA2 , 0); analogWrite(ledPinA3 , 0); analogWrite(ledPinA4 , 0); analogWrite(ledPinA5 , 0); delay(100); state = random(0,3); Serial.println(state); if (state == 0) { analogWrite(ledPin9, 255); analogWrite(ledPin6, 255); analogWrite(ledPinA5, 255); analogWrite(ledPinA2, 255); } else if (state == 1) { analogWrite(ledPin10, 255); analogWrite(ledPin5, 255); analogWrite(ledPinA4, 255); analogWrite(ledPinA1, 255); } else if (state == 2) { analogWrite(ledPin11, 255); analogWrite(ledPin3, 255); analogWrite(ledPinA3, 255); analogWrite(ledPinA0, 255); } } delay(100); //delay for debounce }
7
Appendix 3 Technology Before midterm – Arduino code 2 Mid-term_Mk07___JF.ino //Pinmodes moeten PWM pinnen worden //HIGH - LOW values moeten omgeschreven worden naar PWM
int button = A5; //button pin, connect to ground as button int ledPin9 = 9; // Changed from Setup to global + Changed from 4 to 9 For the Red int ledPin10 = 10; // Changed from Setup to global + Changed from 3 to 10 For the Green int ledPin11 = 11; // Changed from Setup to global + Changed from 5 to 11 For the Blue int ledPin3 = 3; int ledPin5 = 5; int ledPin6 = 6; int ledPinA0 = A0; int ledPinA1 = A1; int ledPinA2 = A2; int ledPinA3 = A3; int ledPinA4 = A4; int ledPinA5 = A5; //int press = 0; boolean LRed = false; boolean LGreen = true; boolean LBlue = false; int r; int count_kid = 0; void setup() { pinMode(button, INPUT); //arduino monitor pin state Serial.begin(9600); //talking to the server is possible } void loop() { int r[] = {LRed, LGreen, LBlue}; if (digitalRead(button) == HIGH) { while(digitalRead(button) == HIGH) { }//while holding the button the program will stay on this line count_kid++; if(count_kid == 4) { count_kid = 0; analogWrite(ledPin3 , 0); analogWrite(ledPin5 , 0); analogWrite(ledPin6 , 0); analogWrite(ledPin9 , 0); 8
analogWrite(ledPin10 , 0); analogWrite(ledPin11 , 0); analogWrite(ledPinA0 , 0); analogWrite(ledPinA1 , 0); analogWrite(ledPinA2 , 0); analogWrite(ledPinA3 , 0); analogWrite(ledPinA4 , 0); analogWrite(ledPinA5 , 0); delay(100); if (LRed == true) { analogWrite(ledPin9, 255); analogWrite(ledPin3, 255); //analogWrite(ledPinA5, 255); analogWrite(ledPinA0, 255); LRed = false; LGreen = true; } else if (LGreen == true) { analogWrite(ledPin10, 255); analogWrite(ledPin6, 255); // analogWrite(ledPinA4, 255); analogWrite(ledPinA1, 255); LGreen = false; LBlue = true; } else if (LBlue == true) { analogWrite(ledPin11, 255); analogWrite(ledPin5, 255); // analogWrite(ledPinA3, 255); analogWrite(ledPinA2, 255); LBlue = false; LRed = true; } } } delay(100); //delay for debounce }
9
Appendix 4 Observation Primary school 10.15 We meet the teacher, she says that the group before them builds up the room and they have to break it down. This to save time. The school uses Janssen-Fritsen products. The P.E. room is large enough for two groups. Because of this there is a lot of sound. The pupils are divided in three groups. One group has to swing ropes, another plays a form of dodgeball and the last group had to jump over a vaulting box and after that over ropes increasing in height. It was notable that the pupils know the products very well and changed the setup to make it easier for the less skilled pupils. After almost 20 minutes the pupils seem bored about the vaulting box. There also does not seem to be a clear reason for the activities.Halfway the groups are switched so everybody does another activity. 10.35 The groups are switched for the second time, everybody does the last activity. The pupils try to make their own rules for dodgeball, although it does not seem to work. It’s either to hard, or too easy. The teacher instructs the last group how to vault over the boxes. 10.41 The pupils are called together because the challenge in the activities seems gone. The children make their own obstacle course and two taggers are assigned (Dutch game: ‘Apenkooien’). After the setup, the teacher changes it slightly for the less skilled pupils. The game ends quickly and the children think up new challenges. The teacher introduces a new rule: when five pupils are out, the first one may go in again. 10.45 Another rule is introduced: the taggers are only allowed to touch the floor. New taggers are also assigned. 10.50 Yet another rule introduced. Also, new taggers are assigned. The taggers now have to count the amount of children they have tagged. This makes it a small competition between the taggers. 10.53 New taggers are assigned. 10.56 The setup needs to be broken down. 11.00 The room is clear again. The pupils are asked for comments on the lesson. The state that the first part (the three activities) got boring very quickly. This was the second time they had to do these activities, which was too much.
10
Appendix 5 Prototype form research This is an extensive list of all the decisions we made and why. From this list we have all the requirements for our prototype. We do not want the pillar to fall when a player walks against it. This is why we figured that the base should be solid and pretty heavy. We also did not want to something to break, fall off or fall apart when something hits the pillar. In a PE class, the change of something like a ball hitting the pillar are very big. Also someone could accidentally kick against the pillar and we do not want one of the sides to break. This is why we decided that we should make it either of a very strong and solid material, or from a flexible rubbery material. In the end we chose a strong and solid material so that it would be already heavier to prevent falling over. We wanted the pillar to be flat and only have large flat parts. We wanted to avoid any sharp edges or little protuberances because it would be dangerous for the player if the run past it. Also we wanted the sides of the pillar to be as flat as possible and with not to many corners, ledges or edges to make it a straight, neat and sleek design. Another aspect we needed to take into account was that we wanted the electronics inside to be safe. The electronics inside costs some money and this is why we wanted it to be as safe as possible. This had two possibilities, making the casing hard and sturdy and the electronics safe inside so that the casing would take all the hits instead of the electronics, or making the casing flexible and bouncy so that the hits would get absorbed. Because we already decided to make it from a strong and sturdy material, this problem was already dealt with. We would chose the sturdier material to protect the electronics. The electronics inside could also be protected by tying them together and making sure everything stay together and does fall loose. We also wanted that the electronics to be reachable for possible repair, recharge or making updates. They had to be easy to get to, but not too easy because we did not want the players to accidentally reach the electronics during the game. For this problem we thought of a little door in the casing which would lead to the electronics, standard access from the bottom, or a removable casing over a base. For this we chose the last solution. A door would not look that good, and it would need a locking mechanism which would be difficult to make safe without the sharp edges and one of the sides of the pillar would have a door in it which would not make it a straight and sleek design as mentioned above. The standard access from the bottom would conflict with the heavy base we wanted because this would make a hole in the bottom and besides that I could mean that the electronics can fall out at any moment. This is why we chose the last option, the removable cover with the base inside. This also makes the whole design a whole lot stronger because it will have a large heavy base inside the casing, which will support the casing at all places. Another important part was visibility. We needed a clear and visible light inside the pillar. We had many possibilities to solve this problem. Some of the ideas we came up with were a transparent top, led strips on the edges, little glasses in the sides or just a light in the top. The light in the top and the led strips on the edges would not be visible enough because we wanted our prototype to be visible from a distance.
11
We needed to take the height of the children into account because this would be an important factor for the height of our prototype. Besides all these factors, we wanted it to have the shape and colours of our client, JanssenFritsen. The newest colours of Janssen-Fritsen are anthracite and darker red. The shapes of Janssen-Fritsen are mostly large straight designs. This is something we wanted to try and take into account in our design.
Appendix 6 Technology After midterm – Arduino code 1 Final_Mk18___Demo_Day_Base.ino #include
#include <SPI.h> #define uchar unsigned char #define uint unsigned int int Number[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; uchar serNumA[5]; uchar fifobytes; uchar fifoValue; AddicoreRFID myRFID; const int chipSelectPin = 10; const int NRSTPD = 9; #define MAX_LEN 16 int ledPin1 = 3; int ledPin2 = 5; int ledPin3 = 6; int brightness = 100; int brightness2 = 50; int brightness3 = 150; int fadeAmount = 5; int fadeAmount2 = 5; int fadeAmount3 = 5; int brightness4 = 50; int fadeAmount4 = 7; boolean LRed = false; boolean LGreen = true; boolean LBlue = false; boolean LBlink = false; boolean LBlinkRed = false; int countKid = 0; int countRed = 0;
//Brightness R //Brightness G //Brightness B //fadeAmount R //fadeAmount G //fadeAmount B //brightness BlinkRed //fadeAmount BlinkRed
void setup() { Serial.begin(9600); SPI.begin(); pinMode(chipSelectPin,OUTPUT); digitalWrite(chipSelectPin, LOW); pinMode(NRSTPD,OUTPUT); digitalWrite(NRSTPD, HIGH); myRFID.AddicoreRFID_Init(); 12
} void loop() { if (LBlinkRed == true && countRed < 1000) { analogWrite(ledPin3, brightness4); brightness4 = brightness4 + fadeAmount4; if (brightness4 <= 10 || brightness4 >= 245) { fadeAmount4 = -fadeAmount4; } delay(10); countRed++; if (countRed >= 1000) { LBlinkRed = false; LGreen = true; } } else if (LBlinkRed == false){ uchar i, tmp, checksum1; uchar status; uchar str[MAX_LEN]; uchar RC_size; uchar blockAddr; String mynum = ""; str[1] = 0x4400; status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str); status = myRFID.AddicoreRFID_Anticoll(str); if (status == MI_OK) { checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3] ^ str[4]; uchar tokenId = str[0] + str[1] + str[2] * str[3] - str[4]; Serial.println(tokenId); /* if (tokenId == 99) { Serial.println("The tag's number is Serial.println(Number[0]); } if (tokenId == 239) { Serial.println("The tag's number is Serial.println(Number[1]); } */ if (tokenId == 230) { Serial.println("The tag's number is Serial.println(Number[2]); LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; countKid++; } else if (tokenId == 165) { Serial.println("The tag's number is Serial.println(Number[3]); LRed = false; LGreen = true; LBlue = false;
: ");
: ");
: ");
: ");
13
LBlink = false; LBlinkRed = false; countKid++; } /* if (tokenId == 161) { Serial.println("The tag's number is Serial.println(Number[4]); } */ else if (tokenId == 207) { Serial.println("The tag's number is Serial.println(Number[5]); LRed = true; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; countKid++; } /* else if (tokenId == 201) { Serial.println("The tag's number is Serial.println(Number[6]); LRed = true; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; countKid++; } */ else if (tokenId == 123) { Serial.println("The tag's number is Serial.println(Number[7]); LRed = false; LGreen = false; LBlue = true; LBlink = false; LBlinkRed = false; countKid++; } else if (tokenId == 117) { Serial.println("The tag's number is Serial.println(Number[8]); LRed = false; LGreen = false; LBlue = true; LBlink = false; LBlinkRed = false; countKid++; } else if (tokenId == 39) { Serial.println("The tag's number is Serial.println(Number[9]); LRed = false; LGreen = false; LBlue = true; LBlink = false;
: ");
: ");
: ");
: ");
: ");
: ");
14
LBlinkRed = false; countKid++; } else if (tokenId == 181) { // Serial.println("The tag's number is : "); // Serial.println(Number[10]); LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; } if (tokenId == 29) { // Serial.println("The tag's number is : "); // Serial.println(Number[11]); LRed = true; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; } else if (tokenId == 6) { // Serial.println("The tag's number is : "); // Serial.println(Number[12]); LRed = false; LGreen = false; LBlue = true; LBlink = false; LBlinkRed = false; } delay(500); } /* if(countKid >= 4) { LRed = false; LGreen = false; LBlue = false; LBlink = true; LBlinkRed = false; countKid = 0; } */ if (LRed == true) { analogWrite(ledPin1, 255); analogWrite(ledPin2, 0); analogWrite(ledPin3, 0); } else if (LGreen == true) { analogWrite(ledPin2, 255); analogWrite(ledPin3, 0); analogWrite(ledPin1, 0); } else if (LBlue == true) { analogWrite(ledPin3, 255); analogWrite(ledPin2, 0); analogWrite(ledPin1, 0); } else if (LBlink == true) { 15
analogWrite(ledPin3, brightness); analogWrite(ledPin2, brightness2); analogWrite(ledPin1, brightness3); brightness = brightness + fadeAmount; brightness2 = brightness2 + fadeAmount2; brightness3 = brightness3 + fadeAmount3; if (brightness <= 10 || brightness >= 245) { fadeAmount = -fadeAmount; } if (brightness2 <= 10 || brightness2 >= 245) { fadeAmount2 = -fadeAmount2; } if (brightness3 <= 10 || brightness3 >= 245) { fadeAmount3 = -fadeAmount3; } delay(25); } myRFID.AddicoreRFID_Halt(); } }
Appendix 7 Technology After midterm – Arduino code 2 Final_Mk22___Stay_Put_Final.ino #include #include <SPI.h> #define uchar unsigned char #define uint unsigned int int Number[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; uchar serNumA[5]; uchar fifobytes; uchar fifoValue; AddicoreRFID myRFID; const int chipSelectPin = 10; const int NRSTPD = 9; #define MAX_LEN 16 int ledPin1 = 3; int ledPin2 = 5; int ledPin3 = 6; int brightness = 100; int brightness2 = 50; int brightness3 = 150; int fadeAmount = 5; int fadeAmount2 = 5; int fadeAmount3 = 5; int brightness4 = 50; int fadeAmount4 = 7; boolean LRed = false;
//Brightness R //Brightness G //Brightness B //fadeAmount R //fadeAmount G //fadeAmount B //brightness BlinkRed //fadeAmount BlinkRed 16
boolean LGreen = true; boolean LBlue = false; boolean LBlink = false; boolean LBlinkRed = false; int countKid = 0; int countTime = 0; void setup() { Serial.begin(9600); SPI.begin(); pinMode(chipSelectPin,OUTPUT); digitalWrite(chipSelectPin, LOW); pinMode(NRSTPD,OUTPUT); digitalWrite(NRSTPD, HIGH); myRFID.AddicoreRFID_Init(); } void loop() { if (LBlinkRed == true) { analogWrite(ledPin2, 0); analogWrite(ledPin3, 0); analogWrite(ledPin1, brightness4); brightness4 = brightness4 + fadeAmount4; if (brightness4 <= 10 || brightness4 >= 245) { fadeAmount4 = -fadeAmount4; } delay(10); } else if (LBlinkRed == false) { uchar i, tmp, checksum1; uchar status; uchar str[MAX_LEN]; uchar RC_size; uchar blockAddr; String mynum = ""; str[1] = 0x4400; countTime++; Serial.println(countTime); status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str); status = myRFID.AddicoreRFID_Anticoll(str); if (status == MI_OK) { checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3] ^ str[4]; uchar tokenId = str[0] + str[1] + str[2] * str[3] - str[4]; Serial.println(tokenId); if (tokenId == 230) { Serial.println("The tag's number is : "); Serial.println(Number[2]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; 17
//
LBlink = false; LBlinkRed = false; */ countTime = 0; countKid++;
} } if (tokenId == 165) { Serial.println("The tag's number is : "); Serial.println(Number[3]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ countTime = 0; // countKid++; } } if (tokenId == 207) { Serial.println("The tag's number is : "); Serial.println(Number[5]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ countTime = 0; // countKid++; } } if (tokenId == 201) { // Serial.println("The tag's number is : "); // Serial.println(Number[6]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ countTime = 0; // countKid++; } } if (tokenId == 123) { // Serial.println("The tag's number is : "); // Serial.println(Number[7]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ countTime = 0; 18
//
countKid++; }
} if (tokenId == 117) { // Serial.println("The tag's number is : "); // Serial.println(Number[8]); if (LGreen == true){ /* LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; */ countTime = 0; // countKid++; } } /* if (tokenId == 39) { Serial.println("The tag's number is : "); Serial.println(Number[9]); } */ if (tokenId == 181) { // Serial.println("The tag's number is : "); // Serial.println(Number[10]); LRed = false; LGreen = false; LBlue = true; LBlink = false; LBlinkRed = false; countTime = 0; } if (tokenId == 29) { // Serial.println("The tag's number is : "); // Serial.println(Number[11]); LRed = true; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; countTime = 0; } if (tokenId == 6) { // Serial.println("The tag's number is : "); // Serial.println(Number[12]); LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; countTime = 0; } delay(10); } /* if(countKid >= 4) { LRed = false; 19
LGreen = false; LBlue = false; LBlink = true; LBlinkRed = false; countKid = 0; } else { }*/ if (countTime >= 40) { LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = true; countTime = 0; } if (LRed == true) { analogWrite(ledPin1, 255); analogWrite(ledPin2, 0); analogWrite(ledPin3, 0); } else if (LGreen == true) { analogWrite(ledPin2, 255); analogWrite(ledPin3, 0); analogWrite(ledPin1, 0); } else if (LBlue == true) { analogWrite(ledPin3, 255); analogWrite(ledPin2, 0); analogWrite(ledPin1, 0); } else if (LBlink == true) { analogWrite(ledPin3, brightness); analogWrite(ledPin2, brightness2); analogWrite(ledPin1, brightness3); brightness = brightness + fadeAmount; brightness2 = brightness2 + fadeAmount2; brightness3 = brightness3 + fadeAmount3; // Serial.println(brightness); if (brightness <= 10 || brightness >= 245) { fadeAmount = -fadeAmount; } if (brightness2 <= 10 || brightness2 >= 245) { fadeAmount2 = -fadeAmount2; } if (brightness3 <= 10 || brightness3 >= 245) { fadeAmount3 = -fadeAmount3; } delay(2); } myRFID.AddicoreRFID_Halt(); } } 20
Appendix 8 Technology After midterm – Arduino code 3 Final_Mk24___Whos_the_one_Final.ino #include #include <SPI.h> #define uchar unsigned char #define uint unsigned int int Number[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; uchar serNumA[5]; uchar fifobytes; uchar fifoValue; AddicoreRFID myRFID; const int chipSelectPin = 10; const int NRSTPD = 9; #define MAX_LEN 16 int ledPin1 = 3; int ledPin2 = 5; int ledPin3 = 6; int brightness = 100; //Brightness R int brightness2 = 50; //Brightness G int brightness3 = 150; //Brightness B int fadeAmount = 5; //fadeAmount R int fadeAmount2 = 5; //fadeAmount G int fadeAmount3 = 5; //fadeAmount B int brightness4 = 50; //brightness BlinkRed int fadeAmount4 = 7; //fadeAmount BlinkRed boolean LRed = false; boolean LGreen = false; boolean LBlue = false; boolean LBlink = false; boolean LBlinkRed = true; int countKid = 0; void setup() { Serial.begin(9600); SPI.begin(); pinMode(chipSelectPin,OUTPUT); digitalWrite(chipSelectPin, LOW); pinMode(NRSTPD,OUTPUT); digitalWrite(NRSTPD, HIGH); myRFID.AddicoreRFID_Init(); } void loop() { uchar i, tmp, checksum1; uchar status; uchar str[MAX_LEN]; uchar RC_size; 21
uchar blockAddr; String mynum = ""; str[1] = 0x4400; status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str); status = myRFID.AddicoreRFID_Anticoll(str); if (status == MI_OK) { checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3] ^ str[4]; uchar tokenId = str[0] + str[1] + str[2] * str[3] - str[4]; Serial.println(tokenId); /* if (tokenId == 99) { Serial.println("The tag's number is Serial.println(Number[0]); } if (tokenId == 239) { Serial.println("The tag's number is Serial.println(Number[1]); } */ if (tokenId == 230) { Serial.println("The tag's number is Serial.println(Number[2]); LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; // countKid++; } if (tokenId == 165) { Serial.println("The tag's number is Serial.println(Number[3]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; // countKid++; } /* if (tokenId == 161) { Serial.println("The tag's number is Serial.println(Number[4]); } */ if (tokenId == 207) { Serial.println("The tag's number is Serial.println(Number[5]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; // countKid++; } /* if (tokenId == 201) {
: ");
: ");
: ");
: ");
: ");
: ");
22
Serial.println("The tag's number is : "); Serial.println(Number[6]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; // countKid++; } */ if (tokenId == 123) { Serial.println("The tag's number is : "); Serial.println(Number[7]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; countKid++; } if (tokenId == 117) { Serial.println("The tag's number is : "); Serial.println(Number[8]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; // countKid++; } if (tokenId == 39) { Serial.println("The tag's number is : "); Serial.println(Number[9]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; // countKid++; } if (tokenId == 181) { // Serial.println("The tag's number is : "); // Serial.println(Number[10]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; } if (tokenId == 29) { // Serial.println("The tag's number is : "); // Serial.println(Number[11]); LRed = false; LGreen = false; LBlue = false; LBlink = false; 23
LBlinkRed = false; } if (tokenId == 6) { // Serial.println("The tag's number is : "); // Serial.println(Number[12]); LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; } delay(500); } /* if(countKid >= 4) { LRed = false; LGreen = false; LBlue = false; LBlink = true; LBlinkRed = false; countKid = 0; } else */ if (LRed == true) { analogWrite(ledPin3, 255); analogWrite(ledPin2, 0); analogWrite(ledPin1, 0); } else if (LGreen == true) { analogWrite(ledPin2, 255); analogWrite(ledPin3, 0); analogWrite(ledPin1, 0); } else if (LBlue == true) { analogWrite(ledPin1, 255); analogWrite(ledPin2, 0); analogWrite(ledPin3, 0); } else if (LBlink == true) { analogWrite(ledPin3, brightness); analogWrite(ledPin2, brightness2); analogWrite(ledPin1, brightness3); brightness = brightness + fadeAmount; brightness2 = brightness2 + fadeAmount2; brightness3 = brightness3 + fadeAmount3; // Serial.println(brightness); if (brightness <= 10 || brightness >= 245) { fadeAmount = -fadeAmount; } if (brightness2 <= 10 || brightness2 >= 245) { fadeAmount2 = -fadeAmount2; } if (brightness3 <= 10 || brightness3 >= 245) { fadeAmount3 = -fadeAmount3; } delay(25); } else if (LBlinkRed == true) { 24
analogWrite(ledPin1, brightness4); analogWrite(ledPin2, 0); analogWrite(ledPin3, 0); brightness4 = brightness4 + fadeAmount4; if (brightness4 <= 10 || brightness4 >= 245) { fadeAmount4 = -fadeAmount4; } delay(10); } myRFID.AddicoreRFID_Halt(); }
Appendix 9 Technology After midterm – Arduino code 4 Final_Mk25___Save_your_Mates_Final.ino #include #include <SPI.h> #define uchar unsigned char #define uint unsigned int int Number[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; uchar serNumA[5]; uchar fifobytes; uchar fifoValue; AddicoreRFID myRFID; const int chipSelectPin = 10; const int NRSTPD = 9; #define MAX_LEN 16 int ledPin1 = 3; int ledPin2 = 5; int ledPin3 = 6; int brightness = 100; int brightness2 = 50; int brightness3 = 150; int fadeAmount = 5; int fadeAmount2 = 5; int fadeAmount3 = 5; int brightness4 = 50; int fadeAmount4 = 7; boolean LRed = false; boolean LGreen = false; boolean LBlue = true; boolean LBlink = false; boolean LBlinkRed = false; int countKid = 0; int countTime = 0; int countTimeBlink = 0; int countGreen = 0;
//Brightness R //Brightness G //Brightness B //fadeAmount R //fadeAmount G //fadeAmount B //brightness BlinkRed //fadeAmount BlinkRed
25
void setup() { Serial.begin(9600); SPI.begin(); pinMode(chipSelectPin,OUTPUT); digitalWrite(chipSelectPin, LOW); pinMode(NRSTPD,OUTPUT); digitalWrite(NRSTPD, HIGH); myRFID.AddicoreRFID_Init(); } void loop() { if (LBlink == true && countTimeBlink < 1500) { analogWrite(ledPin3, brightness); analogWrite(ledPin2, brightness2); analogWrite(ledPin1, brightness3); brightness = brightness + fadeAmount; brightness2 = brightness2 + fadeAmount2; brightness3 = brightness3 + fadeAmount3; // Serial.println(brightness); if (brightness <= 10 || brightness >= 245) { fadeAmount = -fadeAmount; } if (brightness2 <= 10 || brightness2 >= 245) { fadeAmount2 = -fadeAmount2; } if (brightness3 <= 10 || brightness3 >= 245) { fadeAmount3 = -fadeAmount3; } delay(5); countTimeBlink++; if (countTimeBlink >= 1500) { LRed = false; LGreen = false; LBlue = true; LBlink = false; LBlinkRed = false; countTime = 0; countTimeBlink = 0; countKid = 0; countGreen = 0; } } else if(LBlink == false) { uchar i, tmp, checksum1; uchar status; uchar str[MAX_LEN]; uchar RC_size; uchar blockAddr; String mynum = ""; str[1] = 0x4400; countTime++;
status = myRFID.AddicoreRFID_Request(PICC_REQIDL, str); status = myRFID.AddicoreRFID_Anticoll(str); 26
if (status == MI_OK) { checksum1 = str[0] ^ str[1] ^ str[2] ^ str[3] ^ str[4]; uchar tokenId = str[0] + str[1] + str[2] * str[3] - str[4]; Serial.println(tokenId); /* if (tokenId == 99) { Serial.println("The tag's number is : "); Serial.println(Number[0]); } if (tokenId == 239) { Serial.println("The tag's number is Serial.println(Number[1]); } */ if (tokenId == 230) { Serial.println("The tag's number is Serial.println(Number[2]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ // countTime = 0; countKid++; } } if (tokenId == 165) { Serial.println("The tag's number is Serial.println(Number[3]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ // countTime = 0; countKid++; } } /* if (tokenId == 161) { Serial.println("The tag's number is Serial.println(Number[4]); } */ if (tokenId == 207) { Serial.println("The tag's number is Serial.println(Number[5]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ // countTime = 0; countKid++;
: ");
: ");
: ");
: ");
: ");
27
} } /*
if (tokenId == 201) { Serial.println("The tag's number is Serial.println(Number[6]); if (LGreen == true){ LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; // countTime = 0; countKid++; } } */ if (tokenId == 123) { Serial.println("The tag's number is Serial.println(Number[7]); if (LGreen == true){ /* LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; */ // countTime = 0; countKid++; } } if (tokenId == 117) { Serial.println("The tag's number is Serial.println(Number[8]); if (LGreen == true){ /* LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; */ // countTime = 0; countKid++; } } if (tokenId == 39) { Serial.println("The tag's number is Serial.println(Number[9]); if (LGreen == true){ /* LRed = false; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; */ // countTime = 0; countKid++; } } if (tokenId == 181) {
: ");
: ");
: ");
: ");
28
// Serial.println("The tag's number is : "); // Serial.println(Number[10]); LRed = false; LGreen = false; LBlue = true; LBlink = false; LBlinkRed = false; } if (tokenId == 29) { // Serial.println("The tag's number is : "); // Serial.println(Number[11]); LRed = true; LGreen = false; LBlue = false; LBlink = false; LBlinkRed = false; } if (tokenId == 6) { // Serial.println("The tag's number is : "); // Serial.println(Number[12]); LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; } delay(500); } if(countKid >= 4) { LRed = false; LGreen = false; LBlue = false; LBlink = true; LBlinkRed = false; countKid = 0; countTime = 0; countGreen = 0; } if (countTime >= 150) { LRed = false; LGreen = true; LBlue = false; LBlink = false; LBlinkRed = false; countTime = 0; countGreen = 0; countKid = 0; } if (countGreen >= 60) { LRed = false; LGreen = false; LBlue = true; LBlink = false; 29
LBlinkRed = false; countTime = 0; countGreen = 0; countKid = 0; }
if (LRed == true) { analogWrite(ledPin3, 0); analogWrite(ledPin2, 0); analogWrite(ledPin1, 0); } else if (LGreen == true) { analogWrite(ledPin2, 255); analogWrite(ledPin3, 0); analogWrite(ledPin1, 0); countGreen++; } else if (LBlue == true) { analogWrite(ledPin1, 0); analogWrite(ledPin2, 0); analogWrite(ledPin3, 255); } else if (LBlinkRed == true) { analogWrite(ledPin1, brightness4); brightness4 = brightness4 + fadeAmount4; if (brightness4 <= 10 || brightness4 >= 245) { fadeAmount4 = -fadeAmount4; } delay(10); } myRFID.AddicoreRFID_Halt(); } }
30