Implementing bit-banging protocol in your software is not in my power.
Implementing communication is quite simple:
1- Detect Reset: exactly the same than DHT22 but different timing.
2- Send "ACK": exactly the same than DHT22 but different timing.
3- Start to read bits: exactly the same than Detect Reset but different timing.
4- Every 8 bits = 1 byte received: Do whatever with each byte received.
I don't know much about this protocol, but if I understand correctly Master also clocks the Slave to send each bit.
If so, sending data is even easier than DHT22:
1- Detect start signal: exactly the same than Detect Reset but different timing.
2- If bit = 0: Pull line down exactly the same than Send "ACK" but different timing.
If bit = 1: Do nothing.
All this is implemented in DHT22::voltChanged() and DHT22::runEvent() functions.
Unfortunately, 1-Wire protocol it is much more complicated than that...
If and when you can do it, it is entirely on you. Basic sequence:
- Reset
- Enumerate devices
- Search devices
- Read ROM
- Sending command and receiving data
As far as I know that is what the Master does.
The slave just receive bytes and takes actions depending on the byte number ant content.
So some kind of "state machine" must be implemented that do whatever with received bytes.
Tomorrow I will send you a basic implementation of the bit-banging protocol:
Basically copy-paste from DHT22 with some changes.