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.

ATTiny85.ino 318B

3 vuotta sitten
12345678910111213141516171819
  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. }