Trying to establish SPI communication between two Arduinos

I'm trying to establish SPI communication between two Arduinos. When I directly wire pins 10, 11, 12, and 13 of both Arduinos, it works well and I can make them send and receive data. For a project I'm working on, my idea is to develop a quick connection between both Arduinos, something like a plug-and-play connection, so I thought it was a good idea to use a USB-C adapter to easily connect them. I chose USB-C because it is a cheaper solution in terms of adapters and cables. I imagine it is a bad idea since it's not working; there's no communication between the Arduinos. Could you tell me is this diagram is right or not + can anyone help me with a code to transfer ultrasonic sensor data? Attached is the wiring diagram.
attachment 0
12 Replies
Joseph Ogbonna
Joseph Ogbonna•5mo ago
Ok got it. Your connection is right. I will send a Guideline right away
Joseph Ogbonna
Joseph Ogbonna•5mo ago
How To Mechatronics
Ultrasonic Sensor HC-SR04 and Arduino - Complete Guide
In this tutorial we will learn how to use the HC-SR04 Ultrasonic sensor with Arduino. It's the most popular sensor for measuring distance.
aymen ammari
aymen ammari•5mo ago
I'm not sure this is the right link to me, I'm not confused about ultrasonic sensor, I'm looking for a way to transfer data between 2 arduinos using USB type C. Any thoughts?
Joseph Ogbonna
Joseph Ogbonna•5mo ago
Are both end of the cable using type C port ?
aymen ammari
aymen ammari•5mo ago
Yes Sir
aymen ammari
aymen ammari•5mo ago
Did you find any interesting information about that mr joseph?
Joseph Ogbonna
Joseph Ogbonna•5mo ago
I think is to get a type C female connector for both end and use it on the design. Just my thoughts 🤔
aymen ammari
aymen ammari•5mo ago
Yes that's what I did but I just missing the code between them to transfer data
Joseph Ogbonna
Joseph Ogbonna•5mo ago
Let me confirm if I can find a library for this
aymen ammari
aymen ammari•5mo ago
Please, it will help me a lot
Joseph Ogbonna
Joseph Ogbonna•5mo ago
I would say you should the original one. Because I onced got an stlink V2, and most of the time my system couldn't detect it right away. So I say get the original
Want results from more Discord servers?
Add your server