arduino_main.cpp 543 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2023-02-08 WangShun first version
  9. */
  10. #include <Arduino.h>
  11. void setup(void)
  12. {
  13. /* put your setup code here, to run once: */
  14. pinMode(8, OUTPUT);
  15. Serial.begin();
  16. Serial.println("Hello Arduino!");
  17. }
  18. void loop(void)
  19. {
  20. /* put your main code here, to run repeatedly: */
  21. digitalWrite(8, HIGH);
  22. delay(500);
  23. digitalWrite(8, LOW);
  24. delay(500);
  25. }