No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
app.js
listener.js
package-lock.json
package.json
serial.js

README.md

Computer Serial

This code is associated with my Advent Calendar 2018 Project. And the Advent Calendar 2018 Code

This module syncs the date and time to whichever device requests it, in this case, an Arduino.

Files

  • app.js: listens for the #date message and send a timestamp.
  • serial.js: handles all serial connections and messages.
  • listener.js: just listens for any messages sent from the arduino.

How it works

When an Arduino UNO sends the following message over a serial connection:

#date

This script will send the current date as a Unix EPOCH timestamp as a string, prepended with timestamp. So a full response message will look like this:

timestamp:1543497377