Send information binary

Hey,
I started programming with the arduino uno, and had the idea of letting two arduinos communicate. But I couldn't find any clue of how to convert strings into ther bit code (binary) AND back. Hope you can help me.

You shouldn't be using "String" variables, but you can send the characters of the string to another Arduino using this library. The library can also be found in the Arduino IDE Libraries Manager

Why binary? What kind of information do You want to exchange?
Send anything You like and make the receiver use the same format, the same protocol.

Railroader:
Why binary?

You got a better way?

Send the type of data You want, some bytes, some integers, some long.... Why bother how the data is handled in the transmission channel?
Use the same data record, structure for both sender and receiver.

Railroader:
Send the type of data You want, some bytes, some integers, some long.... Why bother how the data is handled in the transmission channel?

Mainly because you must send individual BYTES over a serial link.

The collection of bytes might represent integers, longs, floats, what have you, but when you SEND the values, they must always be broken down into individual bytes before being sent.

Yes of course. Just chop up the data into bytes and send them. Receiving will naturly need to be aware of the muxture of data types arriving. Just guessing are there libraries that can be used by the novice?

Railroader:
Just guessing are there libraries that can be used by the novice?

HardwareSerial.

@TheMemberFormerlyKnownAsAWOL. Thanks. My chrystal ball was working then.

Do I really, really have to say it? :astonished:

:roll_eyes: "YAXYP" = Yet Another XY Problem :roll_eyes:

No usable information provided, a waste of time attempting to provide solutions.

Railroader:
Send the type of data You want, some bytes, some integers, some long.... Why bother how the data is handled in the transmission channel?
Use the same data record, structure for both sender and receiver.

When you send anything over Serial, there is no guarantee it will always be received correctly.

With text, most errors are easy to spot but if it's for something important you still do some kind of error checking.

With binary data the usual practice is to send data in a packet with a CRC number before the marker at the end. Please don't ask what CRC is, just look it up and save me pages of typing, okay?