@nanomatic/ds3231

RTC DS3231 implementation for the Raspberry PI 4 + temperature reading 🌡

Usage no npm install needed!

<script type="module">
  import nanomaticDs3231 from 'https://cdn.skypack.dev/@nanomatic/ds3231';
</script>

README

FSM

@nanomatic/ds3231

Status License


RTC DS3231 implementation for the Raspberry PI 4 + temperature reading 🌡

📝 Table of Contents

🏁 Getting Started

Installing

npm i @nanomatic/ds3231

Using

Example code below:

import { DS3231 } from '@nanomatic/ds3231'

const RTC = new DS3231;

// Writting system time to the DS3231
RTC.set(new Date());

// Reading time from the DS3231
setInterval(() => console.log(`${RTC.get().toString()}  ${RTC.getTemperature()} °C`), 500);

⛏️ Built With

📦 Dependencies

  • rpio - Raspberry I/O library

✍️ Authors

🎉 Acknowledgments

  • Special thanks for Łukasz & Sebastian for working together and giving ideas 😉