简体   繁体   English

Raspberry Pi中的CAN总线和SPI通信

[英]CAN bus and SPI communication in Raspberry Pi

I am developing a prototype for adaptive cruise control using two raspberry pi's. 我正在开发使用两个树莓派的自适应巡航控制的原型。 I have tested SPI on pi and it works (checked it through loopback). 我已经在pi上测试了SPI,并且可以正常工作(通过环回检查)。 Now i want to write this data to the cotroller. 现在我想将此数据写入cotroller。 So, after referring to resources i found Socketcan should be used in order to interface can controller with the pi. 因此,在参考资源后,我发现应该使用Socketcan来与pi进行can控制器接口。 So i request some one to explain how the communication happens like 1. After writing to spi how the can controller can take that data? 因此,我要求有人解释一下通信是如何像1那样发生的。在写给spi之后,控制器如何才能获取该数据? 2. If socketcan be used to take data from spi , i need to know how? 2.如果可以使用套接字从spi提取数据,我需要知道如何?

Thanks 谢谢

I suppose you first need to read this tutorial . 我想您首先需要阅读本教程 If you find something unclear, feel free to ask more specific questions. 如果您发现不清楚的地方,请随时提出更具体的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM