We received some of the parts we ordered. They are 1.8 SPST switches 2.Accelerometer sensor 3.Battery Holder
We started to develop a circuit that lights LEDs when the board holding the circuit accelerates. We are also writing codes to support the accelerometer sensor.
Joshua Sanchez is working on the logic gate for the password system, and he is going to bring a circuit schematic next week.
The code we have so far(when the circuit accelerates, lights LEDs):
#include <Wire.h>
#include <SFE_MMA8452Q.h>
MMA8452Q accel;
void setup()
{
accel.init();
pinMode(13, OUTPUT);
}
void lightLed()
{
if (accel.cz > 1.3)
{
digitalWrite(13, HIGH);
}
}
void loop()
{
if (accel.available())
{
accel.read();
lightLed();
}
}