Translating BINARY?

Hello there,

i have a small question, is there a smart way to convert incoming binary(from another arduino) and translate it to actual text?(chars?)So basically collect bits in group of 8 and make a char of it.

biggiejr: Hello there,

i have a small question, is there a smart way to convert incoming binary(from another arduino) and translate it to actual text?(chars?)So basically collect bits in group of 8 and make a char of it.

the smart way would be to use the built-in Serial tools.

unfortunately i am not able to use Rx Tx ports

biggiejr: unfortunately i am not able to use Rx Tx ports

ahh... serially impaired!

You are going to have to use some pins, though.

SPI? I2C?

you got choices, man!

Or, is this a homework assignment where you have been asked to invent a communication protocol between two Arduinos?

What do you mean by "make a char of it" Do you mean if you get the bit pattern for decimal 65 print 'A' or print "65".

Other wise, check out the setBit() function which will let you turn on an arbitrary bit in a byte. Just read the binary as it comes in and set the appropriate bit if it is 1, or do nothing if it is 0, assuming you set the byte variable to 0x00 to begin.

But keep in mind binary is just a representation of the value. So are hex, decimal, octal en ASCII.

It's the same as one, ein, één, uno, un, 1 are all just representations of the same. Here we only call it different languages (with exception of 1) instead of representations :D