Fix some bugs
This commit is contained in:
parent
7474cbd60d
commit
b5786f568b
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
||||||
BOARD = --board esp8266:esp8266:nodemcuv2
|
BOARD = --board esp8266:esp8266:nodemcuv2
|
||||||
|
|
||||||
verify: hello.ino
|
verify: badge.ino
|
||||||
arduino --verify $(BOARD) $<
|
arduino --verify $(BOARD) $<
|
||||||
|
|
||||||
install: hello.ino
|
install: badge.ino
|
||||||
arduino --upload $(BOARD) $<
|
arduino --upload $(BOARD) $<
|
||||||
|
|
20
badge.ino
20
badge.ino
|
@ -30,6 +30,11 @@ char *badges[][4] = {
|
||||||
"Cybersecurity Educator",
|
"Cybersecurity Educator",
|
||||||
"Los Alamos National Laboratory",
|
"Los Alamos National Laboratory",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Neale", "Pickett",
|
||||||
|
"Los Alamos National Laboratory",
|
||||||
|
"",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Neale", "Pickett",
|
"Neale", "Pickett",
|
||||||
"",
|
"",
|
||||||
|
@ -86,7 +91,7 @@ struct Room rooms[] = {
|
||||||
"into the forest to the east. In one corner of\n"
|
"into the forest to the east. In one corner of\n"
|
||||||
"the house there is a small window which is open."
|
"the house there is a small window which is open."
|
||||||
),
|
),
|
||||||
1, 4, 7, 2,
|
1, 4, 12, 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 4
|
// 4
|
||||||
|
@ -214,7 +219,7 @@ struct Room rooms[] = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 15
|
// 15
|
||||||
"Neale Pickett",
|
"--== Neale Pickett ==--",
|
||||||
(
|
(
|
||||||
"YOU ARE LIKELY TO BE\n"
|
"YOU ARE LIKELY TO BE\n"
|
||||||
"EATEN BY A GRUE\n"
|
"EATEN BY A GRUE\n"
|
||||||
|
@ -305,18 +310,21 @@ void loop()
|
||||||
next = rooms[where].west;
|
next = rooms[where].west;
|
||||||
break;
|
break;
|
||||||
case 2: // center
|
case 2: // center
|
||||||
if (where == 14) {
|
if (where == start) {
|
||||||
// Easter egg!
|
|
||||||
next = start;
|
|
||||||
} else {
|
|
||||||
// Cycle through badges
|
// Cycle through badges
|
||||||
badgeno += 1;
|
badgeno += 1;
|
||||||
if (badges[badgeno][0] == NULL) {
|
if (badges[badgeno][0] == NULL) {
|
||||||
badgeno = 0;
|
badgeno = 0;
|
||||||
}
|
}
|
||||||
showBadge();
|
showBadge();
|
||||||
|
} else if (where == 14) {
|
||||||
|
// Easter egg!
|
||||||
|
next = start;
|
||||||
|
} else {
|
||||||
|
// Show whatever badge was last shown
|
||||||
where = start;
|
where = start;
|
||||||
next = -1;
|
next = -1;
|
||||||
|
showBadge();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: // right
|
case 3: // right
|
||||||
|
|
Loading…
Reference in New Issue