Ich möchte auf einem Teensy 3.6 gerne etwas ähnliches implementieren wie hier beschrieben: https://www.zachpoff.com/resources/arduino-bat-simulator (TCCR gesteuerte PWM-Erzeugung auf dem Arduino). Allerdings finde ich in Teensyduino die Definition für TCCR/OCR1/COM[01]/TCNT1 etc. nicht. Ich kann sehen, dass diese Register in FreqCounter.h oder TimerOne.h referenziert werden - finde aber kein passendes Headerfile für meinen Sketch:
1 | Arduino: 1.8.13 (Linux), TD: 1.53, Board: "Teensy 3.6, Serial, 180 MHz, Faster, US English" |
2 | |
3 | error: 'TCCR1A' was not declared in this scope |
4 | TCCR1A = 0;//registers for timer 1 |
5 | ^ |
6 | error: 'TCCR1B' was not declared in this scope |
7 | TCCR1B = 0; |
8 | ^ |
9 | error: 'TCNT1' was not declared in this scope |
10 | TCNT1=0; |
11 | ^ |
12 | In file included from /opt/arduino-1.8.13/hardware/teensy/avr/cores/teensy3/wiring.h:39:0, |
13 | from /opt/arduino-1.8.13/hardware/teensy/avr/cores/teensy3/WProgram.h:45, |
14 | from /tmp/arduino_build_464072/pch/Arduino.h:6: |
15 | zachpoffs-bat-simulator/zachpoffs-bat-simulator.ino:75:17: error: 'COM1A0' was not declared in this scope |
16 | TCCR1A |= _BV(COM1A0) + _BV(COM1B0); |
17 | ^ |
usw. usw. Hätte jemand einen Tipp für mich?