“Tft.println()”的版本间的差异
1196357542(讨论 | 贡献) (创建页面,内容为“<pre style="color:green"> tft.println(" ") </pre> *'''作用''':<br> 设置在TFT屏幕上打印文字的内容<br> *'''参数''':<br> 引号里写打印的内容...”) |
1196357542(讨论 | 贡献) |
||
| 第36行: | 第36行: | ||
tft.setTextColor(ST7735_YELLOW); | tft.setTextColor(ST7735_YELLOW); | ||
tft.setTextSize(0); | tft.setTextSize(0); | ||
| − | tft.println(" | + | tft.println("Microduino!"); |
} | } | ||
2016年7月13日 (三) 06:59的版本
tft.println(" ")
- 作用:
设置在TFT屏幕上打印文字的内容
- 参数:
引号里写打印的内容
- 例子:
#define sclk 13
#define mosi 11
#define cs 5
#define dc 4
#define rst -1 // you can also connect this to the Arduino reset
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>
#if defined(__SAM3X8E__)
#undef __FlashStringHelper::F(string_literal)
#define F(string_literal) string_literal
#endif
Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, mosi, sclk, rst);
void setup(void) {
tft.initR(INITR_BLACKTAB); // initialize a ST7735S chip, black tab
tft.fillScreen(ST7735_BLACK);
tft.setCursor(10, 40);
tft.setTextColor(ST7735_YELLOW);
tft.setTextSize(0);
tft.println("Microduino!");
}
void loop() { }