PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. DogLcd Library - Hello World
  3. Demonstrates the basic use of a DOGM text LCD display.
  4. This sketch prints "Hello World!" to the LCD
  5. and shows the time.
  6. See the online-documention for wiring instuctions
  7. We assume the following pins are connected:
  8. * LCD SI pin to digital pin 2
  9. * LCD CLK pin to digital pin 3
  10. * LCD RS pin to digital pin 4
  11. * LCD CSB pin to digital pin 5
  12. * LCD RESET pin is not used
  13. * LCD Backlight pin is not used
  14. Library homepage : http://code.google.com/p/doglcd/
  15. */
  16. // include the library code:
  17. #include <DogLcd.h>
  18. // initialize the library with the numbers of the interface pins
  19. DogLcd lcd(2, 3, 4, 5);
  20. void setup() {
  21. // set up the LCD type and the contrast setting for the display
  22. lcd.begin(DOG_LCD_M162);
  23. // Print a message to the LCD.
  24. lcd.print("hello, world!");
  25. }
  26. void loop() {
  27. // set the cursor to column 0, line 1
  28. // (note: line 1 is the second row, since counting begins with 0):
  29. lcd.setCursor(0, 1);
  30. // print the number of seconds since reset:
  31. lcd.print(millis()/1000);
  32. }