0

I apologize if this information could be easily accessed, but I'm new to Arduino and did multiple searches. I'm currently able to write to one Arduino Trinket in Arduino IDE using digitalWrite. However, I'll have to be reading from two different Arduino Trinkets with analogRead. An important part of this is that I must be able to access both devices at the same time. I saw during research that other people were able to use two different Arduino IDE instances, but I don't think this will work for me. I'll more than likely soon be purchasing 2 Arduino ItsyBitsy's or nano's for the serial USB communication. Let me know if this would make the issue easier. I appreciate any help!

  • Thanks for the response, Juraj! I have a better idea of the theory and terminology now, but I'm still not sure how to go about doing the operations I mentioned in Arduino IDE or any other IDE. Would PlatformIO work better? – Ryan Hauser Feb 21 '18 at 5:13
  • To collect data from multiple Arduinos at the same time you will likely have to use the Arduino IDE only for writing and uploading code one at a time, but something else for collecting data from both at once. If you need to graph it you might look into Processing or Numpy or Matlab or whatever strikes your fancy. – Chris Stratton Feb 21 '18 at 6:45
  • Use UECIDE (uecide.org). You can have multiple instances running out of the box and debug (via Serial Monitor) several boards at the same time. – user31481 Feb 21 '18 at 10:15
  • Also asked at: forum.arduino.cc/index.php?topic=530546 If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. – per1234 Feb 21 '18 at 14:33
  • I'm currently attempting to do what I described in platformio with 2 Uno Arduinos following this xcorr.net/2016/12/13/multi-arduino-projects-with-platformio vaguely. – Ryan Hauser Feb 22 '18 at 3:39
1

Arduino IDE is editor and builder. Your sketch runs on microcontroller and the microcotroller doesn't need the IDE to run it. The Serial prints from microcontroller go to com port from which any Terminal app can show them, not only the Serial Monitor build-in in IDE.

Connect both arduinos of same type to computer. They will have different ports. Upload your sketch to the first one, then change the port setting in IDE and upload to second arduino.

Serial Monitor can show you the output of arduino connected to the selected port. Switch port in Tools menu and reopen Serial Monitor to see the output of the second arduino.

To display booth at once, there are some options with different difficulty level:

  1. use two instances of a terminal program like PuTTY Terminal Emulator to show the output
  2. connect the TX pins of arduinos together
  3. send data from one arduino to the second and let the second process them
  • Once again thanks for the response. Following this there's still an issue of having to change the port in the IDE. I should've been clearer about this in my questionm but I need to be comparing the voltages from the arduinos at the same time as they are read in. – Ryan Hauser Feb 21 '18 at 5:49
  • and why two arduinos for that? one arduino can read two voltages – Juraj Feb 21 '18 at 5:56
  • Thanks for the quick response. I'm doing a project that involves pressure sensors on the soles of a user's feet. It seems that the first option would be most appropriate in this case right? – Ryan Hauser Feb 21 '18 at 6:01
  • it depends on the setup of the hardware. how long can be the cable between sensor and arduino? what is the end setup? only to show the values on a computer? – Juraj Feb 21 '18 at 6:13
  • For now, the cable length doesn't matter. No, there will be some comparisons and math operations to analyze posture – Ryan Hauser Feb 21 '18 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.