![]() The tutorial is written with the intent that you only have the "sender" board connected to your computer with the Serial Monitor. This code will cause the sketch to hang in a perpetual loop, calling Serial.begin(9600) over and over and over again until you connect the "receiver" board to your computer via its USB cable and open that board's serial port in the Arduino IDE Serial Monitor (or any equivalent application). Serial1.begin(9600) // initialize UART with baud rate of 9600Ĭhar receivedData = Serial1.read() // read one byte from serial buffer and save to receivedDataĭigitalWrite(LED_BUILTIN, HIGH) // switch LED OnĭigitalWrite(LED_BUILTIN, LOW) // switch LED Off Serial1.println("test") // initialize UART with baud rate of 9600 While(!Serial1)// initialize serial communication at 9600 bits per second: PinMode(LED_BUILTIN, OUTPUT) // set LED pin as outputĭigitalWrite(LED_BUILTIN, LOW) // switch off LED pin I added verification in the receiver loop that it is runningīut Serial1.available()>=0 never becomes true ![]() the sender responds to entered data on usb serial port
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |