lukbe

ILI9341_NodeMCU

Mar 1st, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. /*
  2. LCD --->> NodeMCU
  3. Vcc--->>Vcc
  4. GND--->>GND
  5. CS--->> D1 (1k ohm odpor)
  6. Reset--->>Vcc
  7. D/C--->> D4 (1k ohm odpor)
  8. SDI--->>D7 (1k ohm odpor)
  9. SCK--->>D5 (1k ohm odpor)
  10. LED--->>Vcc
  11. */
  12. #include "SPI.h"
  13. #include "Adafruit_GFX.h"
  14. #include "Adafruit_ILI9341.h"
  15.  
  16.  
  17. #define TFT_DC 2
  18. #define TFT_CS 5
  19.  
  20.  
  21. Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
  22.  
  23.  
  24. void setup() {
  25. Serial.begin(9600);
  26. Serial.println("ILI9341 Test!");
  27.  
  28. tft.begin();
  29.  
  30. tft.fillScreen(ILI9341_BLACK);
  31. tft.setRotation(3);
  32. tft.setCursor(100, 50);
  33. tft.setTextColor(ILI9341_WHITE);
  34. tft.setTextSize(3);
  35. tft.println("LUKBE");
  36.  
  37. tft.setTextColor(ILI9341_RED);
  38. tft.setCursor(5, 100);
  39. tft.setTextSize(3);
  40. tft.println("ESP8266 - NodeMCU");
  41.  
  42. tft.setTextColor(ILI9341_WHITE);
  43. tft.setCursor(20, 150);
  44. tft.setTextSize(3);
  45. tft.println("2.2 TFT ILI9341");
  46.  
  47.  
  48. }
  49.  
  50.  
  51. void loop(void) {
  52.  
  53. }
Add Comment
Please, Sign In to add comment