energy
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 22 KiB |
@ -0,0 +1,61 @@
|
||||
int pushButton1 = 2;
|
||||
int pushButton2 = 4;
|
||||
int pushButton3 = 6;
|
||||
int pushButton4 = 11;
|
||||
|
||||
int buttons[4] = {pushButton1, pushButton2, pushButton3, pushButton4};
|
||||
|
||||
|
||||
void setup() {
|
||||
// set the digital pin as output:
|
||||
Serial.begin(9600);
|
||||
pinMode(pushButton1, OUTPUT);
|
||||
digitalWrite(pushButton1, LOW);
|
||||
pinMode(pushButton2, INPUT_PULLUP);
|
||||
pinMode(pushButton3, INPUT_PULLUP);
|
||||
pinMode(pushButton4, INPUT_PULLUP);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
bool received_input = false;
|
||||
for (int ii = 0; ii < 4; ii++)
|
||||
{
|
||||
for (int jj = 0; jj < 4; jj++)
|
||||
{
|
||||
if (jj == ii)
|
||||
{
|
||||
pinMode(buttons[jj], OUTPUT);
|
||||
digitalWrite(buttons[jj], LOW);
|
||||
}
|
||||
else
|
||||
{
|
||||
pinMode(buttons[jj], INPUT_PULLUP);
|
||||
}
|
||||
}
|
||||
for (int jj = ii; jj < 4; jj++)
|
||||
{
|
||||
if (!(ii == jj) && !digitalRead(buttons[jj]))
|
||||
{
|
||||
Serial.println(analogRead(buttons[jj]));
|
||||
for (int kk = 3; kk >= 0; kk--)
|
||||
{
|
||||
if (kk == ii || kk == jj)
|
||||
{
|
||||
Serial.print(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.print(0);
|
||||
}
|
||||
}
|
||||
Serial.print("\n");
|
||||
received_input = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (received_input)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.7 MiB |
After Width: | Height: | Size: 5.3 MiB |
After Width: | Height: | Size: 8.1 MiB |
After Width: | Height: | Size: 5.0 MiB |
After Width: | Height: | Size: 6.4 MiB |
After Width: | Height: | Size: 762 KiB |
After Width: | Height: | Size: 2.0 MiB |
@ -0,0 +1,58 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Electric Scrapeboard</title>
|
||||
<link rel="stylesheet" href="www/style.css" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="title">
|
||||
<img id="plank" src="resource/Title_plank.png" />
|
||||
<img id="board" src="resource/Introduction_skateboard.png" />
|
||||
<img id="lizard" src="resource/littleSlimeGoop/1_downRight.png" />
|
||||
</div>
|
||||
<div id="question">
|
||||
So you think you can skateboard, but can you <i>scrape</i>board, you slime bag?
|
||||
</div>
|
||||
<div id="boarding">
|
||||
<a href="www/Boarding_1.gif"><img src="www/Boarding_1.gif" width="250" /></a>
|
||||
<a href="www/Boarding_0.gif"><img src="www/Boarding_0.gif" width="250" /></a>
|
||||
</div>
|
||||
<div id="blob">
|
||||
<div id="detail">
|
||||
We have the <span class="highlight">technology</span> to put you on a board which is a
|
||||
wireless electric <span class="highlight">video game</span> controller. Do you have the
|
||||
<span class="highlight">moves</span> to skate through a gauntlet of goons all the way
|
||||
to <i>Tony Hawk</i>?
|
||||
<a id="frank" href="http://twitter.com/diskmem">@diskmem</a>
|
||||
<a id="blake" href="http://twitter.com/snakesandrews">@snakesandrews</a>
|
||||
</div>
|
||||
<div id="detail2">
|
||||
We have the <span class="highlight">technology</span> to put you on a board which is a
|
||||
wireless electric <span class="highlight">video game</span> controller. Do you have the
|
||||
<span class="highlight">moves</span> to skate through a gauntlet of goons all the way
|
||||
to <i>Tony Hawk</i>?
|
||||
</div>
|
||||
<div id="detail3">
|
||||
We have the <span class="highlight">technology</span> to put you on a board which is a
|
||||
wireless electric <span class="highlight">video game</span> controller. Do you have the
|
||||
<span class="highlight">moves</span> to skate through a gauntlet of goons all the way
|
||||
to <i>Tony Hawk</i>?
|
||||
</div>
|
||||
<div id="detail4">
|
||||
We have the <span class="highlight">technology</span> to put you on a board which is a
|
||||
wireless electric <span class="highlight">video game</span> controller. Do you have the
|
||||
<span class="highlight">moves</span> to skate through a gauntlet of goons all the way
|
||||
to <i>Tony Hawk</i>?
|
||||
</div>
|
||||
<div id="detail5">
|
||||
We have the <span class="highlight">technology</span> to put you on a board which is a
|
||||
wireless electric <span class="highlight">video game</span> controller. Do you have the
|
||||
<span class="highlight">moves</span> to skate through a gauntlet of goons all the way
|
||||
to <i>Tony Hawk</i>?
|
||||
</div>
|
||||
</div>
|
||||
<div id="boarding">
|
||||
<a href="www/Boarding_2.gif"><img src="www/Boarding_2.gif" width="250" /></a>
|
||||
<a href="www/Boarding_3.gif"><img src="www/Boarding_3.gif" width="250" /></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,163 @@
|
||||
@import url("../../../lib/fonts/notcouriersans/regular/style.css");
|
||||
@import url("../../../lib/fonts/notcouriersans/bold/style.css");
|
||||
@import url("../../../lib/fonts/cantarell/bold/style.css");
|
||||
|
||||
body
|
||||
{
|
||||
/* background: url("../resource/Ink.png"); */
|
||||
background-size: 100% auto;
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
div#title
|
||||
{
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin-bottom: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div#title img#plank
|
||||
{
|
||||
border-top: 13px dotted lime;
|
||||
border-radius: 100px;
|
||||
border-bottom: 18px dashed lime;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
div#title img#board
|
||||
{
|
||||
width: 100px;
|
||||
transform: rotate(70deg);
|
||||
background-color: yellow;
|
||||
border: 3px groove pink;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 50px;
|
||||
left: 52%;
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
div#title img#lizard
|
||||
{
|
||||
width: 1000px;
|
||||
background-color: rgba(255, 100, 100, .2);
|
||||
opacity: .9;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
z-index: 2;
|
||||
left: 40%;
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
div#question
|
||||
{
|
||||
width: 65%;
|
||||
margin: auto;
|
||||
border: 5px double cyan;
|
||||
background: #B0D0D0E0;
|
||||
line-height: 28px;
|
||||
color: #282828;
|
||||
padding: 50px;
|
||||
border-radius: 18px;
|
||||
font-family: NotCourierSansBold;
|
||||
font-size: 34px;
|
||||
margin-bottom: 18px;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
div#blob
|
||||
{
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div#detail
|
||||
{
|
||||
font-family: NotCourierSans;
|
||||
font-size: 80px;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
div#detail a
|
||||
{
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
left: 30px;
|
||||
font-size: 12px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
div#detail a#blake
|
||||
{
|
||||
top: 95px;
|
||||
}
|
||||
|
||||
div#detail2
|
||||
{
|
||||
font-family: NotCourierSans;
|
||||
font-size: 80px;
|
||||
text-align: justify;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
div#detail3
|
||||
{
|
||||
font-family: NotCourierSans;
|
||||
font-size: 80px;
|
||||
text-align: justify;
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
}
|
||||
|
||||
div#detail4
|
||||
{
|
||||
font-family: NotCourierSans;
|
||||
font-size: 80px;
|
||||
text-align: justify;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
/* color: gray; */
|
||||
/* opacity: .5; */
|
||||
}
|
||||
|
||||
div#detail5
|
||||
{
|
||||
font-family: NotCourierSans;
|
||||
font-size: 80px;
|
||||
text-align: justify;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
/* opacity: .3; */
|
||||
}
|
||||
|
||||
div#photo
|
||||
{
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
div#photo img
|
||||
{
|
||||
width: 300px;
|
||||
border: 18px ridge pink;
|
||||
}
|
||||
|
||||
div#boarding
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div#boarding img
|
||||
{
|
||||
border-radius: 30px;
|
||||
margin: 40px 20px;
|
||||
border: 8px solid black;
|
||||
width: 400px;
|
||||
}
|