Azzera filtri
Azzera filtri

How do I send data through raspberrypi and arduino I2C connection.

1 visualizzazione (ultimi 30 giorni)
There is a problem that I couldn't send question correctly, so I resend my question.
I will send joystick position angle data using wireless.
About sending data, I post figure of connection.
Raspberrypi receives angle data from host PC and send it to arduino. Raspberrrypi connects host PC with wifi, and connects arduino with I2C.
My Question is raspberrypi to Arduino connection. I tried using attached matlab program and arduino program.But I have 2 problem.
1 Matlab can't connect long period of time.
When I start matlab program for 5 minutes, error message will be shown and I can't connect.
*error message*
raspi/recvResponse (line 697) Error writing to I2C bus.
error: raspi.internal.i2cdev/write (line 118) recvResponse(obj.Hw);
error: I2C (line 15) write(i2csensor,b,'int8');
2arduino can't receive minus number data. On the matlab prompt, minus number of joystick angle was shown. But arduino prompt, minus number can't not be shown.
If anyone know how to solve this problem, please tell me.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!