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.

LCD_Output.ino 510B

3 years ago
1234567891011121314151617181920212223242526
  1. /* FreqCount - Example with LCD 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. #include <LiquidCrystal.h>
  8. LiquidCrystal lcd(5, 4, 3, 2, 1, 0);
  9. void setup() {
  10. Serial.begin(57600);
  11. lcd.begin(8, 2);
  12. lcd.print("Freq:");
  13. FreqCount.begin(1000);
  14. }
  15. void loop() {
  16. if (FreqCount.available()) {
  17. unsigned long count = FreqCount.read();
  18. lcd.setCursor(0, 1);
  19. lcd.print(count);
  20. lcd.print(" ");
  21. }
  22. }