arduino_main.cpp 485 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-12-10 Meco Man first version
  9. */
  10. #include <Arduino.h>
  11. uint8_t led = LED_BUILTIN;
  12. void setup(void)
  13. {
  14. /* put your setup code here, to run once: */
  15. pinMode(led, OUTPUT);
  16. }
  17. void loop(void)
  18. {
  19. /* put your main code here, to run repeatedly: */
  20. digitalWrite(led, !digitalRead(led));
  21. delay(100);
  22. }