using the library OneWire
You can work with devices with interface 1-Wire.
But is it possible to make the Arduino to simulate the work of 1-Wire devices?
For example, I connected to the Arduino iButton DS1990A
and read the number:
include <OneWire.h>
/ *
- Test work on the 1-Wire from iButton DS1990A
- /
OneWire ds(10); // [ch1085][ch1072] digital pin 10
void setup(void) {
Serial.begin(9600);
}void loop(void) {
byte i;
byte present = 0;
byte data[12];
byte addr[8];if ( !ds.search(addr)) {
Serial.print("No more addresses.\n");
ds.reset_search();
return;
}Serial.print("R=");
for( i = 0; i < 8; i++) {
Serial.print(addr*, HEX);*
Serial.print(" ");*
}*
if ( OneWire::crc8( addr, 7) != addr[7]) {*
Serial.print("CRC is not valid!\n");*
return;*
}*
if ( addr[0] != 0x01) {*
Serial.print("Device is not a DS1990A family device.\n");*
return;*
}*
Serial.println();*
ds.reset();*
delay(1000);*
}
[/quote]
So can we now make the Arduino to identify itself as such a key?
I.e. Arduino connected to a door and open the door?