Assignment 3: Arduino Programming
Assignment 3: Arduino Programming
Assignment 3
Arduino Programming
Task:
You are to build the system in Tinkercad and fully code (in C/C++)
and test the operation.
After proving the operation here you are to build and test the system
using real hardware.
You can begin your project by using the provided base file, which is
linked to from StudyDesk.
The System
The clock is able to be set to any time using the calibration switches
and potentiometer dials. To set the hour value, the calibrate hour
switch is activated and the relevant calibration potentiometer
adjusted. The LEDs will change to show the current time. The minute
calibration procedure is the same, using a separate switch and
potentiometer.
ELE1301 – Computer Engineering
0 Unused
1 Unused
2 Unused
3 Output, Displays Minutes (Green LED) Least Significant Bit
4 Output, Displays Minutes (Green LED)
5 Output, Displays Minutes (Green LED)
6 Output, Displays Minutes (Green LED)
7 Output, Displays Minutes (Green LED)
8 Output, Displays Minutes (Green LED) Most Significant Bit
9 Output, Displays Hours (Red LED) Least Significant Bit
10 Output, Displays Hours (Red LED)
11 Output, Displays Hours (Red LED)
12 Output, Displays Hours (Red LED) Most Significant Bit
13 Output, Displays AM/PM (Blue) – Off for AM and On for PM
Note 2: We are using two of the analogue pins as digital inputs. This
is a useful capability of the Arduino. We simply use the command
digitalRead(A4) to read pin A4’s value in digital format.
ELE1301 – Computer Engineering
Operation:
The relevant LEDs will indicate the current time in a simple binary
representation of the decimal value of the time. For instance, the
value of 13 minutes would be represented on the 6 green LEDs as:
Pin 3: ON
Pin 4: OFF
Pin 5: ON
Pin 6: ON
Pin 7: OFF
Pin 8: OFF
Report:
Note that this video file must be less than 100 MB in size to allow
it to be uploaded.
ELE1301 – Computer Engineering
Notes:
Refer to the study material, the tutorial activities and the learning
activities for guidance.
Note that the submission must be coded in C/C++. You may use
the Tinkercad blocks to develop basic C code and then use this
and adjust as required. However, your final solution should not
use Tinkercad blocks.
This assignment is based on equipment that is available in the
Arduino Starter Kit. Details and links to data sheets may be
located at this link:
https://store.arduino.cc/usa/arduino-starter-kit
When building the physical circuit using the Arduino hardware,
please ensure that you are familiar with the Safety Guidelines
presented as part of Module 8.
Submission:
Marks
Criteria Insufficient Limited Developing Effective Comprehensive
(of Total 200)
Closely outlines the program Accurately outlines the
Closely outlines the program
The application specification objectives. Includes collation program objectives. Includes
objectives. Includes collation
Application is inadequate, contains of most of the data required collation and analysis of data
20 Not included. of most of the data required
Specification incorrect information or is for the programming. Some required for the
for the programming and is
poorly presented. details missing or not clearly programming and is well
well presented.
presented. presented.
The description of the The description of the
The description of the
program operation contains program operation is
The program description is program operation is logically
Program most relevant details. It may reasonably logically
20 Not included. too brief or does not structured and well written. It
Description be too vague or overly structured and well written. It
contain relevant details. contains all relevant details
specific. It may be contains most relevant details
and is of a suitable length.
inappropriately long. and is of a suitable length.
The designed structure is
The designed structure is The designed structure is suitable and makes highly
The designed structure is
suitable and use of at least suitable and makes some use effective use of functions and
Program Design: functional but does not use
20 Not included. one function and C of functions and C constructs. C constructs. Functions are
Structure functions or C constructs to
constructs, though this could Functions make use of well constructed and make
make it effective.
be done more effectively. arguments and return values. use of arguments and return
values.
Flowchart closely defines the Flowchart accurately defines
Program Design: Flowchart is mostly Flowchart contains some
10 Not included. programming task, including the programming task,
Accuracy inaccurate or deficient. inaccuracies or deficiencies.
subroutine(s). including subroutine(s).
Code file (.ino) The program operated as
Program Testing: Program operated The program operated as
20 file is not The program is incomplete. specified with some minor
Operation incorrectly. specified.
submitted. errors or inconsistencies.
ELE1301 – Computer Engineering
Marks
Criteria Insufficient Limited Developing Effective Comprehensive
(of Total 200)
The testing process is The testing process is The testing process is The testing process is clearly
documented but not documented but not explained and documented. explained and well
Program Testing:
10 Not included. adequately explained and adequately explained or The testing results show documented. The testing
Results
there are deficiencies in the there are deficiencies in the correct operation at each results show correct
testing process or results. testing process or results. stage. operation at each stage.
Showing the program Showing the program running Showing the program running
Showing the program running
Program Testing: running dynamics (not dynamics with correct results dynamics with correct results
10 Not included. dynamics with correct results
Screenshots necessarily correct) for at for one of the required for two or three of the
for the four required states.
least one state. states. required states.
Functions and variables
Program Listing: Functions and variables have
have unique names, though Functions and variables have Functions and variables have
Appropriate 10 Not included. unique names that are easily
these are not necessarily unique, useful names. unique, meaningful names.
Naming distinguished.
easily distinguished.
Data types are correctly Data types are correctly
There are demonstrable chosen and used. Some chosen and used. Thought
Data types are
Program Listing: problems with the data Data types are generally well consideration has been has been consistently given
10 consistently
Data Types types used in at least one chosen and applied. shown to converting these to to converting these to
inappropriate.
place in the program. alternate data types where alternate data types where
the program requires. the program requires.
Program comments are
Program comments are
Program comments are meaningful and improved the
Program comments are meaningful and improved the
Program Listing: inappropriate and program’s readability. The
10 Not included. inappropriate and limited in program’s readability. The
Comments contributed little to the program and any functions
application. program and any functions
program’s readability. are reasonably well
are well documented.
documented.
A short video demonstrating
A short video demonstrating
At least one still photograph At least two still photographs the correct operation of the
the correct operation of the
Physical Circuit 40 Not included. showing construction or showing construction or circuit across some of the
circuit under the required
operation is included. operation are included. required circumstances is
circumstances is submitted.
submitted.