Use the bitWrite() function to set the value of the bit associated with each button input
To send a byte manually in UART communication, follow these steps:
- Set up the UART communication parameters, including baud rate, data bits, stop bits, and parity as needed.
- Prepare the byte you want to send in binary format (8 bits).
- Send the byte one bit at a time, starting with the least significant bit (LSB) and ending with the most significant bit (MSB).
- For each bit, wait for the appropriate amount of time based on the configured baud rate. Typically, you'll use a delay function or timer.
- Send each bit by setting the UART's TX (transmit) pin to the corresponding value (0 or 1) based on the bit's value.
- After sending all 8 bits, send any required stop bits and return the TX pin to its idle state (usually high).
- Repeat the process for each byte you want to send.
This process ensures that data is transmitted serially over the UART communication channel.
For more information Checkout this blog: https://playwithcircuit.com/what-is-uart-and-how-it-works/
@rachna52 why the chatGPT copy/paste? what's the value added?
as a first post it's not so great...