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