Serial Gateway Between Two Pro Mini's - More Info?



  • Greets All!

    I have an issue doing a simple A to B serial gateway test between two Pro Mini's. Before I tear into the sketches and also my scalp, I figured this is a good time to post about this.

    I have two Pro Mini's and two NRF24L01's. I have double and triple checked the connections AND the voltages and they are solid. I also made sure I have decoupling caps on the power feeds. I upped the serial gateway sketch into both Pro Mini's and when they run, I get a dim green light on the board, like it is lit by a 50% duty cycle square wave or something. Each outputs via serial (through a usb FTDI adapter) at 115200 the expected output. But that is it. Nothing more.

    To test if they are connected and data can propagate between them, I figured I would set one to echo what is sent from another. Mostly because I only have one FTDI USB thing and not two. This way, I know it gets sent and can see it get sent back.

    I watched the video, read the "get started" stuff, but I did not see anything about a ping test, or echo tests to see if two (or more) of these things are working.

    Any suggestions? I tried the RadioHead solutions and failed at those. INIT FAILED I kept getting.

    I'm kinda new (haven't you figured that out already? lol) at the NRF24L01 thing, but not new at all at using the wonderful Pro Mini. I'm sure the MySensors library is awesome, but I need more info.

    Any help or thoughts would be greatly appreciated! I did not include it in this post (on my laptop) but I would be happy to include the output I get through the hard serial in my Arduino IDE.

    Thank you so much for your time and consideration!!


  • Admin

    You shouldn't load the gateway on both units (they will both get id 0).

    Load one of the examples on the other unit. I.e LightSensor which only read an analog input.


  • Hardware Contributor

    Try the MockSensors sketch one of the minis. It sends fake sensor data at whatever rate you want (you'll have to edit the sketch to pick a couple of dummy values). Leave the serial gateway on one of them and plug that into the computer. You should see sensor data arrive at expected rate if things are working.



  • Thank you! That helps a lot! I will use this for sensor data gathering later, but for now, I just want to sync two Pro Mini's via a serial data link. Specifically, two wreaths I have doing RGB WS2812B effects. I want them timed together. One needs to just send a byte or two saying it is on a specific effect.

    Thank you guys!



  • OK, this worked and I am encouraged! I haven't figured out how to get the status LED's to work yet though, since they just stay on (after enabling it in the config H file). Unless I missed it though, I do not know what the fields are that are output via serial. If I do not find the info, I guess I could just reverse-engineer the software to figure out how to send simple data back and forth from each unit. Pretty cool library! Heavy though, but not as heavy as expected. I still have room for my RGB LED effects processing.

    Now I just need to see if my interrupt handling using timer1 is going to hose this library. Any thoughts?


Log in to reply
 

Suggested Topics

  • 87
  • 9
  • 1
  • 2
  • 6
  • 3

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts