I'd like to suggest covering Multi Arduino communication for PIN expansion and delegation of duties. I am currently experiencing the need to expand on the amount of PINs I can take advantage of on one board. For instance I am using an UNO for an ultrasonic sensor, LCD display, Motor Controller, etc and would like to expand it to add more sensors. I realize that there is the MEGA Arduino but it would be cool to say connect 1 UNO to multiple NANOs and have the UNO serve as the master controller while the NANOs are used as slave controllers to perform other duties.
Pragmatically the master could issue a request to one of the slaves to report back values is has for a sensor connected to it. Naturally I would scale this up to as many NANOs/Sensors I have needs for. I have been doing a bit of research and came across a few promising things. Turns out there is a library called Wire that could work for me but having you give a deep dive would be really cool!!
Thanks for your consideration.
The unexamined life is not worth living - Socrates
I would like to see how to code Arduino and raspberry pi
could you do a vid on Arduino due? it is a harder board to deal with it and it would be nice to have avideo on it like the video for "how to code Arduino mini".
@jrbdeveloper - Once you get to that level of sophistication maybe you are better off working with a board such as the Teensy 4 or the like. Compared to the uno humungous power that can still use most of the arduino libraries. As for communicating master/slave with other boards would not i2c do it for you?
Thanks for the reply. I had no idea the Teensy 4 existed. That's pretty much where I'm at. I'm really new to the Arduino world of microcontrollers so I suffer from a bit of, I don't know what I don't know. After doing some research it does seem like I2C is the proper route to take which as I understand is Serial communication. At least I'm somewhat certain. I really appreciate the input here because I could use all the direction I can get.
The unexamined life is not worth living - Socrates
On Topic:
I second a motion for multiple microcontroller communications. Perhaps the following could all be done in a single episode?
- Serial to Serial communication between microcontrollers.
- I2C to I2C communications between microcontrollers
- SPI to SPI communications between microcontrollers.
- Are there any other methods?
Also could the microcontrollers include both:
- Arduino to Arduino
- Arduino to Raspberry Pi
This might be too much content for a single episode, but if you could fit it all in it would be a great one to watch!
On The Side:
John, there are actually many simpler methods of increasing I/O pin capacities for a single controller. Look into 74HC595 Shift Register and Arduino on YouTube. There are tons of videos out there for how to increase I/O capacity using these chips. If you need more analog I/O pins, search for videos on 74HC4051 multiplexer chips and Arduino. You're basically unlimited in the number of I/O you can use with a single Arduino. At least if you are willing to use some external shift registers or multiplexers.
DroneBot Workshop Robotics Engineer
James
@robo-pi, sweet!! Thank you for the info! Definitely going to look into this.
The unexamined life is not worth living - Socrates
After doing some research it does seem like I2C is the proper route to take which as I understand is Serial communication. At least I'm somewhat certain. I really appreciate the input here because I could use all the direction I can get.
Yes the I2C is something I also have to get up to speed on if I want to make use of the hardware modules that use it and I see Bill has an I2C tutorial at the dronebot workshop. I used to do something similar pumping data out of the bidirectional ports on the old DOS computers but of course I had my own protocol.
- Are there any other methods?
If the inter board link is ethernet then mqtt or the newer micro- mqtt might be a good topic
And following my mention of mqtt, the OpenMQTTGateway project linking 433mhz/315mhz protocols, infrared (IR), bluetooth, LoRa, GPS etc. may also be worth a topic.
This might be too much content for a single episode, but if you could fit it all in it would be a great one to watch!
Yes, it would be the longest video I've ever done, and I've already exceeded an hour on a couple.
I actually have done I2C between controllers already. And I'm planning some SPI tutorials.
"Never trust a computer you can’t throw out a window." — Steve Wozniak