Metainformationen zur Seite
  •  

Dies ist eine alte Version des Dokuments!


RaspberryPi mit Arduino koppeln

Arduino:

int i = 0;   // for incoming serial data

void setup() {
        Serial.begin(9600);                  // opens serial port, sets data rate to 9600 bps
}

void loop() {
       
        if (Serial.available() > 0) {       // send data only when you receive data:
                
                i = Serial.read();          // read the incoming byte:
              
                Serial.println(i, DEC);     // say what you got:
        }

Raspberry Pi:

sudo nano /etc/inittab
1:2345:respawn:/sbin/getty 115200 tty1
# Line below commented out
# 2:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
3:23:respawn:/sbin/getty 115200 tty3
4:23:respawn:/sbin/getty 115200 tty4
5:23:respawn:/sbin/getty 115200 tty5
6:23:respawn:/sbin/getty 115200 tty6
 sudo nano /boot/cmdline.txt

folgende Zeilen auskommentieren:

console=ttyAMA0,115200 und kgdboc=ttyAMA0,115200