Starting from:

$25

CS 362 Lab 6 SOLVED

CS 362 Lab 6
Learning Goals:
• Be able to take in user input and have your Arduino respond appropriately.
Lab: Due Wednesday 3/6/18
Have your Arduino get the date(mm/dd/yyyy) & time(hh:mm:ss) from the user via the serial
monitor in the Arduino Development IDE software.
• Date includes day, month and year
• Time includes hour, minutes and seconds
You circuit/program should:
• print a prompt on the serial monitor,
• get input of date and time from user via the serial monitor
• include error checking for input that doesn't make sense (hours not in range of 0 to 23,
minutes not in range 0 to 59, month not range of 1 to 12, etc). Giving error messages to
the 16x2 display
• setting the Arduino to contain the (valid) date and time entered by the user.
• display Arduino’s date and time on the 16x2 display
• keep an accurate (continually updating) date and time shown on 16x2 display
To open the Serial Monitor on your computer:
• click on the “Tools” menu item in the Arduino Development IDE
• then click on the “Serial Monitor”
To send input from the Serial Monitor on your computer:
• set the cursor to the input field on the top line in the Serial Monitor window
• type in some text
• click the Send Button to the left of the input field or type in Enter
References on Serial:
https://www.arduino.cc/reference/en/language/functions/communication/serial/
https://www.arduino.cc/reference/en/language/functions/communication/serial/available/
https://www.arduino.cc/reference/en/language/functions/communication/serial/read/
https://www.arduino.cc/reference/en/language/functions/communication/serial/readbytesuntil/
Date/Time library:
• You may need to install the Time Library: https://www.arduino.cc/en/Guide/Libraries
• Time Library Discussion: http://playground.arduino.cc/Code/Time
• Another Time Library: https://www.arduino.cc/en/Reference/CurieTime
Updated Time library:
Github : https://github.com/PaulStoffregen/Time
Using the library : http://www.pjrc.com/teensy/td_libs_Time.html
CS 362 Lab 6 Spring 2019
To be considered completed “on time”, this Lab needs to be demonstrated by end of Lab on Wednesday
3/6/2019. Your code must be submitted to Gradescope BEFORE you demo your lab!
Late Policy
• Late Submission - Submitted and/or demonstrated later that week (before Friday 3/8/19 11:59pm)
25% Penalty
• Late submission – Submitted and/or demonstrated during the following week (before Friday
3/15/19 11:59pm) 50% Penalty
What should I include with my .ino Code File?
As with any code file, it should be written in Good Coding Style: in a manner that will help other people
read and understand the intent, purpose, operation of the code. So your code must include:
• Name the .ino file with your NetId and Lab Number
o I.E. something like: ptroy4Lab2.ino
• Header Comments (including the following)
o // FirstName LastName, UIN and NetID
o // Lab x - Title
o // Description - what is this code supposed to do?
o // Include any assumptions you may have made, what do you expect from the hardware,
pinouts, particular arduino versions, etc.
o // References - where did you find code snippets, ideas, inspirations? if no references
used say: "no references used"
• Code is well documented/formatted with comments, indentations, and descriptive variable names
• Actual code - the functions in the cpp/ino file

More products