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

Wednesday, February 25, 2015

Keypad Program

Hello!
On Sunday I wrote a program for the display and keypad. We had to try several times to get the program right, and on one try, we installed pulldown resistors, which if a button is not pushed then it sets it to a known state. First we had to write out simple instructions on paper, then we had to translate it into code that the Arduino could understand. Here is a picture of the paper code:

Here is a picture of the wiring up process, well, really two:

                                                                         (Close up)
Here is the code:


// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int keypad_columns[]={0,A0,A1,6,7};
const int keypad_rows[]={8,9,10,13};
 //arrays start with zero
 int col;
 int row;
void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 4);
  Serial.begin(9600);
  // Print a message to the LCD.


  //set columns to output
  pinMode(keypad_columns[1], OUTPUT);
  pinMode(keypad_columns[2], OUTPUT);
  pinMode(keypad_columns[3], OUTPUT);
  pinMode(keypad_columns[4], OUTPUT);
 
//set columns to low so in a know state
  digitalWrite(keypad_columns[1], LOW);
  digitalWrite(keypad_columns[2], LOW);
  digitalWrite(keypad_columns[3], LOW);
  digitalWrite(keypad_columns[4], LOW);

  //set rows to inout
  pinMode(keypad_rows[0], INPUT);
  pinMode(keypad_rows[1], INPUT);
  pinMode(keypad_rows[2], INPUT);
  pinMode(keypad_rows[3], INPUT);


}

void loop() {
  //loop through # of colunms.
  for(col=1; col <= 4; col++) {
    digitalWrite(keypad_columns[col], HIGH);
    for(row=0; row <= 3; row++){
    if (digitalRead(keypad_rows[row])==HIGH){
      lcd.clear();
      lcd.setCursor(0, 0);
      lcd.print("button  ");
      lcd.print((4*row)+col);
      }
    }// end of row
    digitalWrite(keypad_columns[col], LOW);
  }//end of col

}//end of void loop





Over & Out!
Elise

Thursday, February 19, 2015

Sketches

Sketches are the programming, or code, that tells the Arduino brain what to do and when to do itt. The most important parts of the window are:


  1. Workspace: The workspace is where you physicaly type, write or open a sketch.
  2. Upload: The button that sends the sketch to the Arduino brain.
  3. Save: This is SOO important! It is vital to save your progress every couple of minutes so that if your computer shuts down, you are just a click away to finishing, or uploading you sketch. 

Here is a picture!!!


Over and Out!!!

Elise

Monday, February 16, 2015

Parts and Pieces

Hi!
Today I am going to tell you a little bit about other parts and pieces that can be added on to an Arduino board. There are things like sensors, LED’s, buttons, switches, and even different boards that can be attached so the board can do many more things! Let me tell you more about them.

Sensors
Sensors have many cool uses, like burglar alarms, and even light shows! Here are some examples of sensors, what they do/are, and pictures!
Temperature Sensor- A temperature sensor can tell what temperature it is in the area or room around them,  and if a room gets too hot or too cold, you can program it to make a noise if you hook a noise maker up to it. Here is a picture:                              




Flex Sensor- A flex sensor tells the board if it should send a lot of power of energy to a LED or display, or just a little bit. It tells the Arduino how much power to send by how much it is being bended or pushed. It looks like this:




Light Sensor- A light sensor is used to tell how much light is in the area or room that is in, and it will tell the Arduino brain to turn on a light, make a noise, turn off a light, etc. Light sensors are often used on the little lamps that people sometimes line their walkways with and when it starts to get dark, it will turn the light on! Here is a picture of a light sensor:




Motion Sensor- Motion sensors are my favorite sensor of all. They are typically used in burglar alarms, and can also be called PIR sensors. They have a range of sight, which can be very small or very large, and this often contributes to the size. A fun way that motion sensors are used is for light shows. Around the holidays, people sometimes program light shows that are activated when cars or people go by.  They tend to look like this:



There are also buttons, switches, and potentiometers that can turn up a volume, make something on a display go faster, or turn on, off, or even dim lights or LED’s.

Buttons- Buttons are very common in everyday life. They can be seen in elevators, cash registers, doorbells, and lots of other places! When a button is pushed, it sends a signal to the Arduino to turn on a light, make a noise, etc. They look like this:



Switches- Switches are seen everywhere, and in almost every building too! They can turn on a light, which completes a circuit, turn off lights, and not just lights, switches can turn on or off just about anything! When a switch is flipped up or down, it sends a signal to the board to do something, like turn something on or off. This is what it looks like:




Potentiometers- Potentiometers are small, stick like things that can turn left or right, which dims lights displays, and other things that brightness can be changed.  They also can turn up or down volume, and even temperature. It can rise or lower anything that can be risen or lowered. It looks like this:




That’s all for now! I hope you learned more about other parts and pieces that can be added onto the Arduino microcontroller!


Over & Out!

Elise

Saturday, February 7, 2015

History

In 2005,   Massimo Banzi, a teacher at the Interaction Design Institute, wanted to make an affordable way for his students to create their own electronic projects.  He wanted them to be able to program the board fast and easy. Along with Massachusetts Institute of Technology, Massimo Banzi and his colleagues worked together to create a easy to use programming language that was free and everybody could use it. 

The team wanted the Arduino to be unique, so they made the color blue, not green like the other circuit boards, and personalized it with a picture of Italy, where the IDII is located. Also, they made it so that it would have more Input / Output slots, so it was easy and simple to add things onto the Arduino microcontroller. When it was ready, the team gave the prototype to 300 students and told them how to build it and that they had to build and program a project.

Since 2005, Massimo and his team have sold hundreds and thousands of not only Arduino UNO boards, but Arduino Due, Mega, Nano, Lilypad, and many others. Other universities have admired the easy programming language and simple, fast way to build useful things.

That's all for now!

Over & Out
Elise




Thursday, January 29, 2015

Binary

Hi!
Today I am going to talk about binary. Binary is written as a series of ones and zeros. The highest number that can be represented by one byte is 255. A byte is eight bits, and four bits is called a nibble. Whoever came up with those names must have had food on the brain! That number in binary form is 1 1 1 1 1 1 1 1 . If you wanted to write 14 in binary, it would look something like this:

128   64   32   16   8    4    2    1
 0        0     0     0    1    1    1    0

So 14 in binary is 0 0 0 0 1 1 1 0.
If you wanted to write 97 in binary, it would look like this:

128   64   32   16   8    4    2    1
   0      1     1     0    0    0    0    1

So 97 in binary is 0 1 1 0 0 0 0 1!

If you were wondering what the 128,  64,   32,  16,   8,    4,    2,    1, is, they are the place values of each number. 128   64   32   16   8    4    2    1 are the place values of each number, so if you go through the numbers one by one, you can figure out how many times that number is represented in the number you are turning into binary. But remember, you can only use each number once, and if you do not need a number to translate the total number into binary, you have to write a zero or the computer will think you are writing a smaller or bigger number than what you really are.

This morning, my Dad and I were working on binary! Here is a picture of what we did!




That is all for now!

Over & Out,
Elise


Wednesday, January 28, 2015

For Loops

A for loop is a loop that you can get out of/it will eventually end. It consists of three parts, initializing, conditional test, and iteration. Initializing assigns the variable with a known value. The conditional test checks if the current value of the variable is either greater then, less then, or equal to a number, and iteration is something done each time when the loop is complete.

A example is:
For(int z = 5 ; z <= 7 ; z++)
{
// do something here
}

In the above example, the variable z is being assigned to the value of 5, and it will loop through 3 times, because z++ is adding 1 to the value of z each time, so after 3 loops. the value of z will be 8, which is greater then 7, so the conditional test will turn out false, stopping the loop.

Also, below is a picture of what I wrote in my notebook!




Over & Out!
Elise

Monday, January 26, 2015

Interview Q's & A's

Hello!
Yesterday I interviewed Elecia White. It ws fun and very interesting to learn more about her and her job. Below are the questions and their answers.


Questions for interview.
1. What do you do? Do you have any other jobs? If so, what are they?
She is an embedded software engineer, and has worked on toys, race cars, and is an author. She also has a podcast.

2. In what way did this type of work interest you and how did you get started? 
 She went to small engineering science college. Her 2 favorite subjects were computer science and math. Being a system engineer made her happy because when she first made a motor move because she told it to, she said it felt magical.

3. Who would you say has been the most help in your career? How did they help you? 
Her husband, because he works in a similar job, so being able to talk to about problems makes them easier to solve.

4. What kinds of problems do you deal with?
Puzzles,because some of them are fun, and when frustrating puzzles are solved it feels good. People and puzzles are her main problems.

5. Do you find your job exciting or boring? Why?
25% exciting, 10% boring, and 65% interesting.

6. Is multitasking a skill that is required for this job?
Computers multi task, and they switch back and forth so fast people cannot tell. People can switch like computers, but when doing a hard problem they need compete focus on the task at hand.

7. What projects have you worked on that have been particularly interesting? 
Dna scanners, leapfrog toys, fitbit are all things she has worked on. She has also worked on the shotspotter, which detects gunshots in city and is very accurate when it tells the police exactly where it is. She likes knowing that it saves lives. She also made a ring that shows strange words when she taps it because she likes strange words.

8. What is a typical day like?
She plays with computer, tests outside, and think about what will do tomorrow. She also has lunch with friends.

10. What are your hobbies?
She likes to read all types of stories, has a podcast, writes a blog,

11. Did you have any other career choices?
She wanted to be a marine biologist, or journalist, has been manager, wrote a book but writing is hard work so Elecia said that she is glad she did not become a journalist. 

12. How does a person progress in your field? What is a typical career path in this field or organization?
A typical career path is to go to college, become a tech assistant, then become the person who tells the tech assistants what to do and helps them do it, and finally, a manager. 

13. What is the best way to enter this occupation?
College, robotics clubs, and other robotic groups and activities.

14. How would you describe the working atmosphere and the people with whom you work?
Sometimes quiet, because everybody is all focused so they can go home and do other things, and it sometimes noisy and playful. She likes to work with happy people.





She made a really big difference in my project, and I would like to say THANK YOU! Overall, she helped me see that even if you face problems in your job, when it is finished or solved then you feel good. Also, even if you face problems sometimes, your job can always be fun.

Over & Out
Elise

Tuesday, January 20, 2015

Thank you!!!!!!

I just wanted to say thank you to Elecia White, because she has agreed to be interviewed! I wanted to thank her for giving up some of her time to help me, because it will make a big difference in my project!  Thank You Elecia!!!

Over & Out!
Elise

Wednesday, January 14, 2015

Elecia White

Hi!

Today I sent an email to Elecia White, author of Making Embedded Systems. A link to her book is http://www.amazon.com/Making-Embedded-Systems-Patterns-Software/dp/1449302149/. I hope she agrees to be interviewed!

Over & Out
Elise

Sunday, January 11, 2015

LCD Display

Today I worked on a display. I made it say messages, and I also could type a message and it would send to the display. It was kind of weird, because when the first line ran out of space, it would move on to the third line! And when the second line ran out of space, it would move to the fourth line! It was pretty confusing, so I had to keep the messages short and sweet. 

I will use the display to display whether or not any of the sensors are sensing. I will also use it to show if the system is armed or disarmed. Here are some photos!





I am sure it will also do other things too, let me know what you think!

Over & Out,
 Agent Elise

Saturday, January 3, 2015

Book Information

Hello! I have begun step 1 of Operation Arduino Alarm. The research. I skimmed these books and with the title/author is what I think about the book.

Beginning Arduino, by Michael McRoberts, has lots of info about sensors, display boards and robots. I even own the robot on the cover!! Cool right?!

Learn Electronics with Arduino, by Don Wilcher, is mostly projects but could be kind of helpful.

Arduino, by Terence O'Neill and Josh Williams, explains many different versions of Arduino boards and has lots of functions and what they do.

Arduino Adventures, by James Floyd Kelly and Harold Timmis, explains Arduino, has projects, tells about functions, etc., all while making it fun!

Arduino Workshop, by John Boxall, has lots of projects and full color pictures, making it easier to understand!! (After all, I'm only 10!)

Arduino Cookbook, by Michael Margolis, is uber complicated, but with some help from my Dad, it has some good info.

Programming Arduino: Getting Started with Sketches, by Simon Monk, is, thus the name, about sketches, functions, sensors, and all sorts of projects, including one featuring Morse code!

Programming Arduino: Going Further with Sketches , also by Simon Monk, builds onto the book prior to this one, only with much more complicated stuff!

Arduino for Beginners, by John Baichtal, (what is it with Johns and writing Arduino books?!), is about every single little thing you need for a few projects. (Well, maybe not everything, but still pretty close!)

Getting Started with Arduino, by Massimo Banzi, co-founder of Arduino, explains 99.9% of every thing Arduino in excruciating detail. There is even a chapter called "Arduino is not for Quitters!" AHHH! Wait did I say he was the co-founder Arduino?! Then I take that all back!

Whew! That was a-lot! I  hope I did not confuse you beyond explaining with all those words! That's al for now!

Over & Out!!
Elise


Thursday, January 1, 2015

Topics

Hi! Here is a list of the topics I will be researching for this years project.

  • Arduino-Parts/Pieces, what is an Arduino, what can it do, purpose, etc.
  • History-Arduino's history, how it was made, how has it evolved, etc.
  • Binary- What is binary, how it works, how to translate, etc.
  • Input/Output
  • Sketches-What are sketches, what do they do, how are they important for an Arduino program (hint: they basically make-up the program!)
  • Functions/Loops-What are functions and loops, what some can do, why are they important, etc.
  • Sensors-What they do, some examples, etc.
  • Shields/Other boards-What are shields, what are some of the other boards compatible with the Arduino UNO, etc.



That's all for now!

Over&Out

Elise