For some post, I found nothing.
I'm asking for help to emulate a DS2401 to replace the serial number with another one.
Someone told me that these possible!
Tank You
For some post, I found nothing.
I'm asking for help to emulate a DS2401 to replace the serial number with another one.
Someone told me that these possible!
Tank You
Maybe Mr Google can help you but a search for "arduino 1-wire emulator" gives this as the top result.
Thank you, I did the test but I just want to change the serial number for another and he found me talking about temperature.
nucleaireqc:
Thank you, I did the test but I just want to change the serial number for another and he found me talking about temperature.
Not quite following your reply. I think your saying you tested the code (did you remember to set the serial number to the one you need) but not sure what your referring to about temperature. The DS2401 example is not ideal but you can trim it down to it's bare essential. I cannot test the code here at work as I only have one spare Arduino today so cannot generate the serial and test reading it on another Arduino.
/*
* Example-Code that emulates a DS2401
*/
#include "OneWireHub.h"
#include "DS2401.h" // Serial Number
constexpr uint8_t pin_led { 13 };
constexpr uint8_t pin_onewire { 8 };
auto hub = OneWireHub(pin_onewire);
auto ds2401 = DS2401( DS2401::family_code, 0x00, 0xA0, 0x01, 0x24, 0xDA, 0x00 ); // Work - Serial Number
void setup()
{
Serial.begin(115200);
Serial.println("OneWire-Hub DS2401 Serial Number");
// Setup OneWire
hub.attach(ds2401); // always online
Serial.println("config done");
}
void loop()
{
// following function must be called periodically
hub.poll();
}