Two friends for one arduino
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Two friends for one arduino

by JayMauch on Sat May 25, 2019 1:07 pm

I am trying to run two friend sw uarts into either a Uno or Mega to demo for our high school robotics team. I cross connect the two friends to each other, then bluetooth an iPhone to one, and a Android phone to the other, using the bluefruit app on both phones. Setting both phones to uart, I can type on either phone and send text to the other.
Next, I set one phone on controller/ location and the other phone shows the raw location-ish data in the uart display.

I am trying to bring in the location, gyro, accelerometer, and magnetometer data from one phone mounted on the robot, to let the sketch decide which direction it needs to tell the robot to go to get to a premarked set of bases/ coordinates. The other phone is to be used as the Human Interface Device, for menu input such as marking the 'bases' positions, and manual movement commands.

When I connect one uart to either Arduino, load the Adafruit controller sketch and use the serial monitor, it displays the location data.

When I connect both uarts to either Arduino, and load the Adafruit controller sketch, then things get complicated.

Do I need to duplicate the BluefruitConfig.h tab and and rename the 2nd tab and change the pin numbers in the 2nd tab for the 2nd uart? If so, how do I accomplish this. Or is there a way that I can instantiate a 2nd while loop with different pin numbers for the 2nd uart? Or do I need to run one sw uart and another SPI friend, or two SPI friends?

Posts: 9
Joined: Sat May 04, 2019 5:04 pm

Please be positive and constructive with your questions and comments.