Monday, March 30, 2015

Functions

Hello!
Today I am going to tell you about functions. Functions are a set of instructions that can be used over and over. Each function has 1 job. void main ( ) is the only function that is in every single program no matter what. A function prototype tells what variable is going to return. In this case, the variable in the prototype is a float, which means a decimal number is going to return. A peramiter is information to give to the function. The peramiter holds a set of instructions for the . The function prototype goes before main, because if it goes after,  the computer would not  know what sphere, the name, meant. Here is a function example.
/* sphere.c */

   #include <stdio.h>                /* Include header file for printf. */
   #define PI 3.141592654            /* Define a constant. */

   float sphere( int rad );          /* Function prototype. */

   void main()                       /* Main program. */
   {
     float vol;                      /* Declare variable. */
     int radius = 3;                 /* Declare and initialize variable. */
     vol = sphere( radius );         /* Call function, get result, print it. */
     printf( "Volume: %f\n", vol );
   }

   float sphere( int rad )           /* Function. */
   { 
     float result;                   /* Local variable declaration. */
     result = rad * rad * rad;

     
result = 4 * PI * result / 3; return( result ); /* Result returned to main program. */

Over & Out
Elise

Saturday, March 28, 2015

Input Output

Hello! Today I am going to be talking about input and output, also known as I/O.
Input and Output are the signals going in and out of the Arduino. When you use a  Digital pin, the state is either On or Off . This is also called discrete.  When using a Analog pin, it  can hold a range of values. Input is information going into the Arduino ,such as a button push or sensor readings, and Output is signals going out, such as turning on a light or making a noise. When using a Digital pin, in the program you need to set it to input or output. The function you would use to do so is pinMode( ).

Monday, March 23, 2015

Sheilds

Hello! Today I am going to tell you a little bit about shields. First of all ,what is a shield anyway? Well, a shield is a board that has another purpose, but can be inserted into the Arduino's pins so the Arduino can then control it, which is a standard connection which means that no matter what shield you have it can still plug into the arduino. Here are some examples of shields and what they do:

Weather Shield: The Weather Shield is an easy to use Arduino shield that lets you see the  barometric pressure, relative humidity, luminosity (amount of light) and temperature in the area. There are also connections on this shield to optional sensors that can track things such as wind speed, direction, rain gauge and GPS for location and super accurate timing.

WiFi Shield: The WiFi shield  allows an Arduino board to connect to the internet using WiFi. It connects to an Arduino board using long wire-wrap headers which extend through the shield. This keeps the pin layout intact and allows another shield to be stacked on top.

Motor Driver Shield:  This is a motor shield for Arduino that will control two DC motors. It can drive up to 2 amps per channel. The board takes its power from the same Vin line as the Arduino board.

Ethernet Shield: My personal favorite, the Ethernet shield   allows an Arduino board to connect to the internet. he Arduino Ethernet Shield supports up to four simultaneous socket connections. Use the Ethernet library to write sketches which connect to the internet.


Although there are many other types of Shields compatible with the Arduino, these are some of my personal favorites.

Over & Out
Elise

Wednesday, March 18, 2015

Status

Hello!
I am just going to inform you what progress I have made so far and my plans to complete my project.
When I started, I had several thing to do. They are:

  1. Parts & Pieces
  2. History
  3. Binary
  4. I/O
  5. Sketches
  6. Functions & Loops
  7. Sensors
  8. Shields & Other boards

Now take a look at that same list, but revised with what I have already done. Here:
  1. Parts & Pieces
  2. History
  3. Binary
  4. I/O
  5. Sketches
  6. Functions & Loops
  7. Sensors
  8. Shields & Other boards
So basicly, all I have left to research is Input/Output, Functions, Shields and Other Boards.
Once I have finished those, I plan to spend lots of time over spring break working on writing the program and building the alarm system. Almost Done!

Over & Out
Elise

Thursday, March 12, 2015

Sub-Systems of the MAin Alarm System

Here are the descriptions of the jobs that will be in the Arduino Alarm system.

Door Alarm- This sensor will check if the door that it is hooked on to is open or closed. This piece will need 1 pin, a digital, which can turn something on or something off.

Dust/Smoke Sensor- This sensor will check how much smoke or dust, if there even is any,  is in the air around the sensor. It will require 2 pins, AnalogIn, which can hold different numbers or readings/levels, and a Digital On/Off pin.

Arm/Disarm-  This will be in the program, it is not an actual component, but it will arm the alarm if the A button has been pushed.  It will DisArm if the correct code has been typed on the keypad. It is to change the state of the armed variable. It needs 0 pins.

Panic- This will be a button that automatically sets off the alarm. The function is to check if the button has been pushed or not. It will need 1 pin. Digital On/Off. The program is supposed to set the state of the panic variable.

Motion- This sensor will check for motion in the area. It requires 1 pin. Digital On/Off INput. It's job is to set the motion variable.

Alarm Indicator- This is to activate the indicator, (light Sound etc.) that a sensor has been activated, but it will only go off if the alarm is Armed.  It will  about 4 pins.

Display- The displays job is to produce text and format it  based on the state of the alarm. (Armed DisArmed) . It need 6 pins that are Digital ON/OFF.

Keypad- This is to keep track of the key presses. It is keeping track of the button that has been pushed if a button is pushed. It needs 8 pins, 4 digital input and 4 digital output.


That's all for now!

Over & Out
Elise