**A Simple Circuits

20170517_124251Screen Shot 2017-05-23 at 12.47.37 PM

Advertisements

Electrical Safety

Humans( Conductor)

https://www.stevespanglerscience.com/lab/experiments/human-circuit/

  • Don’t touch electrical circuits with your fingers.
  • Should someone come into contact with electricity, don’t touch them; shut down the main power.
  • Never touch anyone’s electrical circuits unless invited to do so.

Water( Conductor)

https://www.quora.com/What-should-I-do-if-water-gets-into-an-electrical-outlet

  • If there is a spill, shut off the main power before doing anything else.
  • Never work with electrical circuits with wet hands or on a wet floor.

Metal (Conductor)

https://www.metalsupermarkets.com/which-metals-conduct-electricity/

  • Don’t wear metal jewelry or watchbands when working on electrical circuits.
  • Disconnect the power source before working on electrical circuits and devices.
  • Use tools with non-conducting handles.

myGameIS.pde

20170425_123743 (1)-/0/This Program was created by Ismael

int base=5;
int x,y,gameScore=0;
int changeX=-10;
int changeY=-10;
int gameOver=0;
void setup()
{
size(450, 550);
x=(int)random(width);
y=height-base;
}
void draw()
{
if(gameOver==0)
{
background(0);
text(“SCORE:”+gameScore+”00”,width/2,height/2);
rect(mouseX,height-base,200,base);
ellipse(x,y,10,10);
x=x+changeX;
y=y+changeY;
if(x<0 | x>width)
{
changeX=-changeX;
}
if(y<0)
{
changeY=-changeY;
}
if(y>height-base)
{
//check whether it is falling inside the rectangle or not
if(x>mouseX && x<mouseX+200)
{
changeY=-changeY; //bounce back
gameScore++;
}
else
{
gameOverSplash();
}
}
}
else
{
background(255,0,0);
text(“Game Over!”,width/2,height/2);
text(“CLICK TO RESTART”,width/2,height/2+20);
}
}
void gameOverSplash()
{
gameOver=1;
}
void mouseClicked()
{
changeY=-changeY;
gameScore=0;
gameOver=0;
}