Digital Input and Output

Objective

Our objective for this lab was to understand how to connect and use the Arduino. In addition, we had to first use the examples codes form the basic menu and then later implement those two code to make it in one code. Finally, display it logically or indicated using LED and buzzer.

Equipment Required

  • A computer with an Arduino driver and software install.

Procedure

In this lab we had 3 parts to do. 1ft part was to use ā€œDigitalreadserialā€ program. 2nd one was ā€œBlinkā€ program and 3rd part was to combine parts 1 and 2, implementing thoes code into one porgram.

Part 1

  1. Wire the cricuit and connect the arduino to the computer.
  2. Find the program you want to run, in our case we will be running ā€œDigitalreadserialā€.
  3. To find the progarm, follow these steps .File > Examples > Basic > Digitalreadserial.

lab1

Ā Part 2

  1. Wire the cricuit and connect the arduino to the computer.
  2. Find the program you want to run, in our case we will be running ā€œBlinkā€.
  3. To find the progarm, follow these steps .File > Examples > Basic > Blink.

Capture1Capture2

 

Part 3

  1. Wiring the cricuit in part 1&2 together makes it the new cricuit for part 3 of this lab and connect the arduino to the computer.
  2. We had to write the program, using ā€œif ,elseā€ statements in oder to combine the two program.

Capture3Capture4

pinMode mean that a user can configure the behaver of a speacifi pin as an input or output.

DigitalWrite means to assigne a highĀ  or low value for a speacifi pin, if not assigne using pinMode. Using pinMode before using Digitalwrite it useful because then the pin will have the exact output it required.

Digitalread.

DigitalRead means is that whatever was assigned to a digital pin in digitalWrite reads the value from a speacified digital pin such as high or low.

Conclusions

In conclusion these experiment help me acquaint with basic Arduino programing, the ā€œDigitalreadserialā€ and ā€œBlinkā€ example programs. We also use other sensors that are included in the lab kit for our experiment we use the buzzer when the LED was high. At first I did had problem with the buzzer not working properly, it was due the wiring our 5v pin wasnā€™t connected right. Overall, we really didnā€™t had any other problem other than just getting the program to be implemented it right.

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *