PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 satır
318B

  1. #include <TimerOne.h>
  2. #define ledPin 4
  3. int ledState = LOW;
  4. void setup() {
  5. pinMode(ledPin, OUTPUT);
  6. Timer1.initialize(500000); //The led will blink in a half second time interval
  7. Timer1.attachInterrupt(blinkLed);
  8. }
  9. void loop() {
  10. }
  11. void blinkLed(){
  12. ledState = !ledState;
  13. digitalWrite(ledPin, ledState);
  14. }