Baris Sanli's Raspberry Pi and Gertboard Resources

Arduino ile Webserver-ESP8266
Spark Core Energy Monitor
Connecting Raspberry
Error Message
Serial Communication
Interfacing LCD

A Serial Communication between ATMEGA328p (Gertboard) and Raspberry Pi

Setup: Raspberry Pi, Gertboard, 2 jumpers

Warning : If you are not using Gertboard, do not power up ATMEGA328p with 5 V, this will damage Raspberry Pi!

First of all, let's make sure that all the jumpers are in place, including the standart 3V3 jumper...

  • The jumpers on the left (J6) are
    Jumper - between MCTX-GP15
    Jumper - between MCRX-GP14

After getting the jumpers ready, from Raspberry Pi compile and "upload using programmer", the following code

-----------------------This is the code for Arduino-----------------------------------------

char incomingByte=0;
char inData[20];
int x=0;

void setup() {
// initialize serial:

void loop() {
  Serial.print("hello print");
 while (Serial.available()>0){;
   inData[x+1]='\0'; x++;

On the Raspberry Pi, run the following python code :
-----------------------This is the code for Raspberry Pi-----------------------------------------
from time import gmtime, strftime
import time
import serial
import struct

ser = serial.Serial("/dev/ttyAMA0", 9600)
while 1:
  temp=strftime("%Y-%m-%d %H:%M:%S", gmtime())+'\t'+ser.readline()


emailto :