Breadboard adapter - Arduino slave to EV3


#1

Hi there,
I recently bought a few of the EV3 to arduino breadboard adapters in the hopes that my students will find them useful for their robotics projects. I am having some trouble getting the communication to function. Here is what I am trying to do:

I have the arduino set up as the slave to the EV3 and I am trying to do an “AnalogRead” with a TCRT5000 IR sensor. I believe I have everything set up exactly as described in the tutorial, the IR sensor is working properly independent of the communication issue, and both programs upload to the EV3 and the Arduino. The problem is that the program will not run on the EV3. I tried fooling around with the switches on the breadboard adapter, but no combination seemed to help. My other programs on the EV3 open and run fine.

Any help you could offer me would be great. Many thanks!

DJ


#2

Hey djdeck, sounds like an interesting project. I’ll try to help out with what I can here. The EV3 and the Arduino are talking over I2C.

First, it helps if you have a logic analyzer available (or an advanced oscope). This should tell you if the clock is running, and if you have your wires crossed (literally the biggest problem if you’re working with I2C).

Also, I would double check you don’t have your wires (SDA/SCL) crossed between the Arduino and the EV3.

Do you have a picture of the circuit and how you have it setup right now?

Best, John


#3

Thanks for the quick reply, John. I appreciate the help.

I have a DSO Nano V3, but I do not know how to use it just yet. I will look into this right away!

Here is a picture of the circuit, perhaps you can spot the issue?

When running the program on the EV3, the program seems to start up for a fraction of a second and then go back to the program selection screen.

Thanks again,
DJ


#4

First impression is that you have that white line from VIN on the Arduino to the breadboard adapter 5V. Can you try running that line from 5V to 5V?

Also, A4 and A5, are they your SDA/SCL lines?


#5

I made the switch with the white line, but still no luck. My problem seems to be that the Mindstorms program won’t even start up on the EV3. Shown below are the codes I am using (I took them from your website and and Github zip file).

Thanks again for the help!


#6

So, I looped the Mindstorms code, and now the program runs continuously on the EV3, but the reading on the IR sensor doesn’t show up. What shows up on the EV3 screen is the Addr number on the Dexter Industries EV3 block in the code. What does the Addr refer to?

I feel like we’re getting closer!


#7

Got it working. The problem was I am using an Arduino MEGA 2560, and the SDA and SCL pins are digital pins 20 and 21. The system is working great now, this opens a pile of opportunities for my students potential projects. Below is the code I set up with your brick to make the TCRT5000 act as a button. Great adapter! Thanks for the help,
DJ


#8

Great to hear DJ, that’s fantastic! Thanks for sharing the code.