ArduinoGeneral

'C' instruction to send multi-byte command

userHead Richard.Lincoln 2023-07-04 00:12:37 125 Views1 Replies

Hello Forum,

I have an Arduino related question.  What is the ‘C’ language instruction to send a multi-byte command from an Arduino GPIO port to a device?  Thank you in advance for your assistance.

2023-07-04 14:34:09

Hello,

In Arduino or most of the MCU like Arduino, they use the Serial output pin to transfer multi-byte data.

You could refer to the official docs for Arduino to get to know about the Serial output.

 

https://www.arduino.cc/reference/en/language/functions/communication/serial/print/

 

It's Serial.print()

 

And if you feel the Hardware Serial is not enough for you, cuz you want to connect more than one Serial Sensor.

The Arduino provides a software Serial library, you could init some of the GPIO(Not all of them) as your SoftSerial.

You could also refer to the SoftwareSerial Doc for detail:

https://docs.arduino.cc/learn/built-in-libraries/software-serial

 

They have also provide a sample code for it.

 

 

userHeadPic Yeez_B