@nanomatic/time_synchronize
v1.0.2
Published
Time synchronization based on any RTC module for the Linux Ubuntu
Downloads
8
Maintainers
Readme
📝 Table of Contents
🏁 Getting Started
Installing
npm i @nanomatic/time_synchronize
Using
Example code below:
import TimeSynchronize from '@nanomatic/time_synchronize';
import { DS3231 } from '@nanomatic/ds3231';
const RTC = new DS3231;
// Config time synchronization
TimeSynchronize.config(() => RTC.get(), RTC.set);
// Start synchronization
TimeSynchronize.start();
// Swtich off automatic stop after first corrert synchronization by Internet
// TimeSynchronize.auto(false);
// Stop synchronization
// TimeSynchronize.stop();
⛏️ Built With
- @types/node - Type definitions for Node.js
- ts-node-dev - TypeScript Node Dev
- tsc-watch - The nodemon for TypeScript
- TSLint - TypeScript linter
- NodeJs - Test Environment
📦 Dependencies
- @nanomatic/ds3231 - RTC DS3231 implementation for the Raspberry PI 4 + temperature reading 🌡
- axios - Promise based HTTP client for the browser and node.js
✍️ Authors
- @NANOmatic - Idea & Initial work
🎉 Acknowledgments
- Special thanks for Łukasz & Sebastian for working together and giving ideas 😉