Serial communication between Baby Orangutan and Ar

Dear all,

I need to establish a serial communication between a Baby Orangutan and a Arduino Pro mini. For each microcontroller I use its own libraries! My first goal is to connect the arduino RXD and TXD pins to orangutan TXD and RXD pins respectively and transmit a single byte!

So far nothing. I am new to both microcontroller devices so any help in this matter would be greatly appreciated.

For the arduino I use the following code:

void setup() {
// initialize both serial ports:
Serial.begin(9600);

}

void loop() {
int inByte = 79;
Serial.print(inByte, DEC);

}

For the orangutan I try to read the data as follows:

#include <pololu/orangutan.h>

// A global ring buffer for data coming in.
char buffer[100];

// A pointer to where we are reading from.
unsigned char read_index = 0;

char read_next_byte()
{
char ret=0;
while(serial_get_received_bytes()!=read_index)
{
ret = buffer[read_index];
read_index ++;
if(read_index >= 100)
read_index = 0;
}
return ret;
}

/////////////////////////////////////////////////////////////////////

int main()
{
DDRC = 0x01;
// start receiving data at 9.6 kbaud
serial_set_baud_rate(9600);
serial_receive_ring(buffer, 100);
PORTC|=_BV(0);

while (1)
{
// wait for a Data
char Data = read_next_byte();
//unsigned char Data= serial_get_received_bytes();

if (Data == 79)
PORTC&=~_BV(0);
}
return 0;
}

I have connected an indication LED to PC0 on the BabyO to verify the data transmition.

Please help,

Akis

To use them to communicate with an external TTL serial device, connect the TX pin to your device's RX pin, the RX to your device's TX pin, and the ground of your Mega to your device's ground.

RXD and TXD pins to orangutan TXD and RXD pins respectively

As I think Wagner is alluding to, have you got the GNDs tied togther as well?


Rob