dparson55 / NRFLite

nRF24L01+ library with AVR 2 pin support, requiring very little code along with YouTube videos showing all available features.
MIT License
159 stars 26 forks source link

ATTiny85 Sensor with 2 Pin #36

Closed AlshainAvior closed 4 years ago

AlshainAvior commented 4 years ago

Hi Dave,

This library (ATTiny85 with 2 Pin) is really help me a lot since tiny85 have limited IO, but is it possible to modify the library so the TX Mode can run in a two way communication (TX and RX using two pin for Attiny 85 --> if we refer to basic TX with 2-pin and basic RX with 2-Pin in example) ?

Thank you in advance

dparson55 commented 4 years ago

The 2-pin operation supports two way communication, you can use the TwoWayCom_Software or TwoWayCom_Hardware examples as a starting point and just tweak them slightly to use the 2-pin init and rather than using Serial.print to see status, instead blink an led (for example).

AlshainAvior commented 4 years ago

Hi Dave, It is run properly for the 2-Pin communication between Tiny85 and NRF24, but for two way communication (Parsing/Sending String from TX <--> RX) still not work, currently I using two unit arduino (uno) with NRF24 in each side and run deploy your Two way communication SW Based (TX and RX) it running properly, but once i tried to send the string it's not work properly (TX Received [RX act as Transmitter] multiple times and RX Received [TX act as Transmitter] sometimes or opposite), by millis() it should be read per 3999ms , you can find the code in below

https://github.com/AlshainAvior/NRFLITE-TEST/blob/master/Arduino_SWBased_TX/Arduino_SWBased_TX.ino

and

https://github.com/AlshainAvior/NRFLITE-TEST/blob/master/Arduino_SWBased_RX/Arduino_SWBased_RX.ino

Please help to take a look the code, I also mention about the packet data type (enum). Thank you in advance

dparson55 commented 4 years ago

I forked your example and got it working. I created a pull request with the changes and put notes about the necessary changes. Let me know if you have any questions.

image

AlshainAvior commented 4 years ago

Hi Dave,

Big Thanks to you, it's work also in 1mbps, really appreciate your response and amazing library.

again, Thank you

dparson55 commented 4 years ago

Good to hear it's working, best wishes!