ECE 420 assignment I Arduino Functions and Command Structures READ THE INSTRUCTIONS: this is intended to be a demo of some of the skills you’ve acquired so

ECE 420 assignment I Arduino Functions and Command Structures READ THE INSTRUCTIONS: this is intended to be a demo of some of the skills you’ve acquired so far working with parts of code from the examples – do each step as outlined starting from a new sketch in the Arduino IDE. ECE 420 Individual Assignment 1
Arduino Functions and Command Structures
Due: Friday March 8th (11:59PM)
READ THE INSTRUCTIONS: this is intended to be a demo of some of the skills you’ve acquired so far
working with parts of code from the examples – do each step as outlined starting from a new sketch in
the Arduino IDE.
This assignment will be submitted via Canvas:
Please include the requested information as a SINGLE (.DOC) file
Add a complete copy of your code (copy paste) from the Arduino IDE [screen shots will not be
accepted] If you are having trouble with copying from the IDE you can save and open the sketch as an
*.INO and open it using Notepad++ or another text editor. (This file is formatted plain text).
Answers to any questions asked at the end of the exercise.
— Don’t panic! -ASSIGNMENT 1:
Generate a single Arduino code sketch*which accomplishes the tasks listed below:
1) Declare a Global boolean value with a name of your choice (for use in conditional in function A)
2) Declare an integer number* (for use in calculations function C)
*Use the last three numbers of your student id – declare the value as a constant
3) Declare FIVE pins, FOUR DIGITAL and ONE ANALOG, use any names you want,
*try using good coding practices like underscores_to_separate_words (typically for variables) or
camelCaseForNames (typically for functions)
A) Select DIGITAL pins from first bank – pins 0 – 12, do not use the built in LED on pin 13.
b) You can select any ANALOG pin from A0-A15.
4) In the SETUP declare the pin modes of the DIGITAL pins one as input, the others as output
5) READ the ANALOG and DIGITAL (input) values at the start of each “loop()” – you need to declare
a variable to store the values in – be sure to watch out where you declare those variables to
insure the right access for the scope.
6) Create 3 functions which match the following types:
A) Simple “if /else” decision statement
(Compare value, of the ANALOG pin to some ‘int’ value “threshold”)
This function should set the DIGITAL (output) pin to either HIGH or LOW based on the
value of your ANALOG input. (Attaching an LED to that pin will allow you to see the
current state of the decision criteria)
{ex. Set the int value [threshold] to ‘1000’ Analog input is 3.3v – value read in is 1023 which is >
1000 so the value is True}
Also: Set (change the value of) the GLOBAL BOOLEAN variable you made in step 1 to
(TRUE) in the case of a value above the threshold, and (FALSE) in all other cases (else).
B) A switch / case statement
1) Using one BIT from the DIGITAL (input) pin, and the Boolean you set from the ANALOG pin in
function A, create a switch structure with 4 conditional cases:
Digital State
Boolean State
2) Each case should set should set (assign the value of) TWO DIGITAL pins HIGH or LOW based
on the values of the DIGITAL pin (5) and the bool in function (A) based on the value threshold.
You should print a unique string to the host computer via the
SERIAL console to indicate the case selected by each binary state.
C) Build a function that TAKES as an argument, the current ANALOG value and RETURNS the
result of TWO sequential [the result of one operation is the input of the second] arithmetic
operations. Use the constant student id you declared in (2) as an input to at least one of your
operations. You may use the MATH built in functions, but they must be called inside your user
defined function.
Your function should also print the results of the sequential operations to the host
computer via the SERIAL console as a new line.

Purchase answer to see full

Don't use plagiarized sources. Get Your Custom Essay on
ECE 420 assignment I Arduino Functions and Command Structures READ THE INSTRUCTIONS: this is intended to be a demo of some of the skills you’ve acquired so
Just from $13/Page
Order Essay
Homework Market Pro
Calculate your paper price
Pages (550 words)
Approximate price: -

Our Unique Features

Custom Papers Means Custom Papers

This is what custom writing means to us: Your essay starts from scratch. Plagiarism is unacceptable. We demand the originality of our academic essay writers and they only deliver authentic and original papers. 100% guaranteed! If your final version is not as expected, we will revise it immediately.

Qualified and Experienced Essay Writers

Our team consists of carefully selected writers with in-depth expertise. Each writer in our team is selected based on their writing skills and experience. Each team member is able to provide plagiarism-free, authentic and high-quality content within a short turnaround time.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Assuarance

We understand you. Spending your hard earned money on a writing service is a big deal. It is a big investment and it is difficult to make the decision. That is why we support our claims with guarantees. We want you to be reassured as soon as you place your order. Here are our guarantees: Your deadlines are important to us. When ordering, please note that delivery will take place no later than the expiry date.

100% Originality & Confidentiality

Every paper we write for every order is 100% original. To support this, we would be happy to provide you with a plagiarism analysis report on request.We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

We help students, business professionals and job seekers around the world in multiple time zones. We also understand that students often keep crazy schedules. No problem. We are there for you around the clock. If you need help at any time, please contact us. An agent is always available for you.

Try it now!

Calculate the price of your order

Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Our services are second to none. Every time you place an order, you get a personal and original paper of the highest quality.


Essay Writing Service

While a college paper is the most common order we receive, we want you to understand that we have college writers for virtually everything, including: High school and college essays Papers, book reviews, case studies, lab reports, tests All graduate level projects, including theses and dissertations Admissions and scholarship essays Resumes and CV’s Web content, copywriting, blogs, articles Business writing – reports, marketing material, white papers Research and data collection/analysis of any type.


Any Kind of Essay Writing!

Whether you are a high school student struggling with writing five-paragraph essays, an undergraduate management student stressing over a research paper, or a graduate student in the middle of a thesis or dissertation, has a writer for you. We can also provide admissions or scholarship essays, a resume or CV, as well as web content or articles. Writing an essay for college admission takes a certain kind of writer. They have to be knowledgeable about your subject and be able to grasp the purpose of the essay.


Quality Check and Editing Support

Every paper is subject to a strict editorial and revision process. This is to ensure that your document is complete and accurate and that all of your instructions have been followed carefully including creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.


Prices and Discounts

We are happy to say that we offer some of the most competitive prices in this industry. Since many of our customers are students, job seekers and small entrepreneurs, we know that money is a problem. Therefore, you will find better prices with us compared to writing services of this calibre.