Announcement

Collapse
No announcement yet.

Wireless communication between 2 NRF24l01s

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wireless communication between 2 NRF24l01s

    Hello,
    i am trying to connect a Gen4 display to a wireless temp sensor using 2 NRF24l01’s. I am having trouble writing to objects that are in my visi genie program. I have tried several different ways. I can send data back and forth and display them on a serial monitor, But I don’t know how to update custom digits for example. I thought about trying to use visigenie print statement on both ends through 2 Arduinos. But I can’t get them in sync. I have looked at several serial examples including magic bytes but i have not been able to make it work. The display is the Master in this scenario. Can you please point me in the right connection.
    thanks,

    Mark

  • #2
    Hello,

    You can check this appnote for Writing to Genie Objects Using an Arduino Host
    https://www.4dsystems.com.au/appnote/4D-AN-00018/.

    Hope it helps,
    Bern

    Comment


    • #3
      Hello,

      I am trying to receive temp data from a remote temp sensor connected via a NRF24l01 radio. I have the code below testing the communication between the 2 radios and I could use some help understanding how I can read the data received on the display. I am confused about the CNS pin on the radio. The pin out says:
      the CSN pin(4) "Chip Select Not" has to be kept high or it will disable the radio. I took this to mean that it needs to be connected to another pin set to high, but none of the examples show this.


      #platform "Gen4-uLCD-43DCT-CLB"

      #inherit "4DGL_16bitColours.fnc"

      #CONST
      CS PA0
      SDO PA1
      SDI PA2
      SCK PA3
      #END

      func Main()
      pin_HI(CS) ;
      pin_Set(PIN_OUT,CS);
      SPI1_SDI_pin(SDI);
      SPI1_SCK_pin(SCK);
      SPI1_SDO_pin(SDO);
      SPI1_Init(SPI_SPEED6, SPI8_MODE_2);


      var answer;

      repeat

      SPI1_Write(0x01); // Request
      answer:= SPI1_Read();

      forever
      endfunc
      So my goal here is to send some data from the remote temp sensor to the display via the radios and see the information on the display. Any help as always would be appreciated.
      Thanks,
      Mark

      Comment


      • #4
        Hello,

        Unfortunately we currently don't have any libraries for the NRF radio tranceivers. You may refer to this Arduino library for the routines: https://github.com/nRF24/RF24. The SPI configuration, read and write timings can be checked here:https://www.sparkfun.com/datasheets/...d_spec_1_2.pdf at pages 19-20.
        Hope it helps.

        Best regards,
        Bern

        Comment

        Working...
        X