Advertisement
MrRockchip

blinker_part8266

Nov 9th, 2021
1,047
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. // Initial setup
  2. void setup()
  3. {
  4.  /*
  5.   * It is recommended to use the lower baud rate. The higher the baud rate,
  6.   * the higher the bit error rate will be, and the control action might fail.
  7.   */
  8.   Serial.begin(4800); // Initialize the ESP8266 <=> MEGA2560 serial port
  9. }
  10.  
  11. // The loop function runs over and over again forever
  12. void loop() {
  13.   Serial.print("0"); // Command for MEGA2560 to turn off MEGA2560's L LED
  14.   delay(5000); // wait 5 seconds
  15.   Serial.print("1"); // Command for MEGA2560 to turn on  MEGA2560's L LED
  16.   delay(5000); // wait 5 seconds
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement