You will want to look at the prior post to see how the hardware is setup and how the software works as I literally moved the software from the PC to the Raspberry Pi, made a couple of tweaks and it runs as it did in on the PC. If not, it will request the LED be turned off. If motion has been detected then the RPI will tell the arduino to turn on the LED. If it is on, then it will look at the motion detector. The RPI sends commands to the arduino to read the status of the switch and motion detector and to turn the LED on and off. The basic idea of the project is to communicate with an Arduino that has a switch, motion detector, and LED on it. For this project, the arduino is configured exactly the same and running exactly the same software as it was in my prior post. In my last post, I did the same thing, except communicating between a PC and an Arduino serially. If you want to communicate between an arduino and an RPI using I2C, see this older post: Raspberry Pi/I2C with Lazarus/Free Pascal. In this blog post I’m going to discuss how to connect a Raspberry Pi to an Arduino via USB and then communicate between them serially.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |