2014年10月14日 星期二

[Raspberry Pi][Arduino] Raspberry pi connect to arduino by using I2C

The architecture about How to connect between Raspberry pi and Arduino.

enter image description here

How to write code and load binary file into arduino
[arduino] Starting arduino

Download following arduino code and compile it.
Arduino Source Code

Download following arduino code and compile it.
Raspberry Pi Source Code

gcc main.c -o main
./main 1
pi@raspberrypi ~/test $ ./a.out 1
I2C: Connecting
I2C: acquiring buss to 0x4
Sending 1
Received 1

Reference:
  1. Arduino 1.0.6
  2. Raspberry Pi and Arduino Connected Using I2C
  3. Connecting an Arduino to a Raspberry PI using I2C
  4. Connect Raspberry Pi to Arduino with I2C Interface
  5. I2C communication between a RPI and a Arduino
  6. DS1621 with Raspberry Pi/ArchLinuxARM
  7. Control your light at home with a Raspberry Pi and Olimex’s MOD-IO2

Related Posts:

0 意見:

張貼留言