🏠 vdwulp.github.io

📚 Arduino iButtonTag Library

Arduino CI Arduino-lint JSON-syntax License: MIT GitHub release

An Arduino library handling iButton identification tags.

👍 Supported Devices

Model Reading ID-code Writing ID-code
DS1990, DS1990A, DS1990R, TM1990A ✔️  
RW1990, RW1990.1, RW1990v1, TM08, TM08v2 ✔️ ✔️
RW1990.2, RW1990v2 ✔️ ✔️
RW2004, TM2004 ✔️ ✔️
TM01, TM01C ✔️ ✔️
Many other iButton tags ✔️  

iButton tags model TM1990AiButton tag model RW1990iButton probe flat model with indicator LED

✈️ Installation

  1. Open Arduino IDE
  2. Go to Tools > Manage Libraries…
  3. Search for “iButtonTag”
  4. Click Install
  5. Click Install All to also install required OneWire library

If you don’t see the Install All button mentioned in step 5, you have an older Arduino IDE (<1.8.10). Consider upgrading the IDE, or repeat steps 1 to 4 above to install OneWire library. In step 3 search for “OneWire”.

Manual installation

  1. Download the latest release ZIP file from iButtonTag releases
  2. In Arduino IDE, go to Sketch > Include Library > Add .ZIP Library…
  3. Select the downloaded ZIP file
  4. Repeat steps above to install required OneWire library; in step 1 download ZIP file from OneWire releases

🚶 Basic Usage

Hardware Setup

Code Example

   #include <iButtonTag.h>                     // Include the library

   #define PIN_PROBE 2                         // Data line connected to pin 2

   iButtonTag ibutton( PIN_PROBE );            // Setup iButtonTag on the pin

   void setup(void) {
     Serial.begin(9600);
   }

   void loop(void) {
     iButtonCode code;                         // Variable to store ID-code

     Serial.println( "Reading... " );
     int8_t status = ibutton.readCode( code ); // Try to read ID-code

     if ( status > 0 ) {                       // Code read succesfully
       Serial.print( "iButton code read: " );
       ibutton.printCode( code );              // ID-code is in variable _code_
       Serial.println();
     }
   }

🏃 Advanced Features

🛠️ Hardware Notes

iButton identification tags

Pull-up resistor

iButton probes

📓 Documentation & References

Documentation

Articles

Data sheets

🙏 Thanks

🗒️ License

MIT License, full text available in LICENSE file.

Copyright (c) 2025 SA van der Wulp