How do I send data through raspberrypi and arduino I2C connection.
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Setup and Configuration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!