PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

20 rindas
361B

  1. /* FreqCount - Example with serial output
  2. * http://www.pjrc.com/teensy/td_libs_FreqCount.html
  3. *
  4. * This example code is in the public domain.
  5. */
  6. #include <FreqCount.h>
  7. void setup() {
  8. Serial.begin(57600);
  9. FreqCount.begin(1000);
  10. }
  11. void loop() {
  12. if (FreqCount.available()) {
  13. unsigned long count = FreqCount.read();
  14. Serial.println(count);
  15. }
  16. }