Question

In: Electrical Engineering

1(a). You are required to interface and write sample programme to test the operation of the...

1(a). You are required to interface and write sample programme to test the operation of the following devices of the microcontroller board, namely (i) Push Buttons (ii) LEDs (iii) Analog input (using the potentiometer)

(b). A LED is to be interfaced to pin 3 of the microcontroller board. Please draw the necessary hardware circuit to show the connection. Write a sample software to glow the LED with ON time 1 sec and OFF time 1 sec.

(microcontroller is Arduino)

Solutions

Expert Solution

1a) i) The program to interface the pushbutton is shown below.

program is based on switching of pushbutton. the LED is taken as output , for every push of button the led glows.

ii ) The program for LEDs is shown below

the program is done inorder to check the output of LEDs, they are programmed in a way that each of them blink for 2 seconds and turn off.

iii) The program to measure analog value is shown below.

the program is done, based on the output of the potentiometer. the change in output of potentiometer changes the output of arduino.

ANSWER for (b)

GIVEN conditions LED to glow 1 sec and off for 1 sec .

the program for above condition is as follows;

The following picture shows the connection of led ,

The following programs are done in arduino software in order to make sure the provided program is with out errors.


Related Solutions

For these exercises you are required to edit in the Comparable interface implementation, a compareTo() method,...
For these exercises you are required to edit in the Comparable interface implementation, a compareTo() method, starting with the class definition you obtained from the link, and submit that with a client that uses this ordering. If you are so inclined, you may submit a single client to drive your ordering enhancements for both classes, rather than one for each class. The exercises, for those without the text: 19. Modify the Point class from Chapter 8 so that it defines...
For these exercises you are required to edit in the Comparable interface implementation, a compareTo() method,...
For these exercises you are required to edit in the Comparable interface implementation, a compareTo() method, starting with the class definition you obtained from the link, and submit that with a client that uses this ordering. If you are so inclined, you may submit a single client to drive your ordering enhancements for both classes, rather than one for each class. The exercises, for those without the text: 19. Modify the Point class from Chapter 8 so that it defines...
Imagine that you are planning a user-based usability test to evaluate a new interface that allows...
Imagine that you are planning a user-based usability test to evaluate a new interface that allows people to track online their medical information, such as blood tests, diagnostics, annual check-ups, and patient visits. Since many governments have set the goal to move to full electronic patient records in the next few years, this is an important project. Doctors will also use this application but, for this exercise, we’re focused on patients. Where might you want to recruit potential participants? Would...
write a programme named question5a.cpp that calculate and print pay slip
write a programme named question5a.cpp that calculate and print pay slip
1. You are tasked with developing a research programme for one of the areas mentioned below....
1. You are tasked with developing a research programme for one of the areas mentioned below. Outline (i) the main objective, (ii) the expected outcomes and (iii) at least four specific research projects to be executed. The programmes are (a) Biochar production and utilization, (b) Non-timber Forest Products development
Suppose the interface and the class of stack already implemented, Write application program to 1- insert...
Suppose the interface and the class of stack already implemented, Write application program to 1- insert 100 numbers to the stack 2- Print the even numbers 3- Print the summation of the odd numbers
When do you use each test? 1) 1-Proportion z test 2) T-test 3) 2 sample t...
When do you use each test? 1) 1-Proportion z test 2) T-test 3) 2 sample t test 4) Matched pairs test
1. Describe how can you prepare the spectroscope and explain its principle of operation 2. Write...
1. Describe how can you prepare the spectroscope and explain its principle of operation 2. Write if the spectroscope would work if there was no gap at the end? Why the gap helps What would happen if it had an X shape? 3. How will the colors change when you rotate the diffraction grating? 4. Explain how the rainbow is formed and what functions as a diffraction grating in this phenomenon. 5. Explain what problems are involved in studying distant...
1. Describe how can you prepare the spectroscope and explain its principle of operation 2. Write...
1. Describe how can you prepare the spectroscope and explain its principle of operation 2. Write if the spectroscope would work if there was no gap at the end? Why the gap helps What would happen if it had an X shape? 3. How will the colors change when you rotate the diffraction grating? 4. Explain how the rainbow is formed and what functions as a diffraction grating in this phenomenon. 5. Explain what problems are involved in studying distant...
1. Describe how can you prepare the spectroscope and explain its principle of operation 2. Write...
1. Describe how can you prepare the spectroscope and explain its principle of operation 2. Write if the spectroscope would work if there was no gap at the end? Why the gap helps What would happen if it had an X shape? 3. How will the colors change when you rotate the diffraction grating? 4. Explain how the rainbow is formed and what functions as a diffraction grating in this phenomenon. 5. Explain what problems are involved in studying distant...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT