Разное о выращивании табака на Алтае
Вы не вошли.
Страницы 1
Не в сети
Не в сети
```cpp
#define double_buffer
#include <PxMatrix.h>
#include <Ticker.h>
Ticker display_ticker;
#define P_LAT 16
#define P_A 5
#define P_B 4
#define P_C 15
#define P_D 12
#define P_E 0
#define P_OE 2
// Pins for LED MATRIX
PxMATRIX display(32,32,P_LAT, P_OE,P_A,P_B,P_C);
void display_updater()
{ display.display(70);}
struct Text {
char *text;
uint16_t width, height;
int16_t x, y;
int16_t dx, dy;
} text = {"Hello", 0, 0, 0, 0, 1, 1};
uint16_t textColor = display.color565(0, 0, 55);
uint16_t myBLACK = display.color565(0, 0, 0);
uint16_t lineColor = display.color565(255, 0, 0);
uint16_t backgroundColor = display.color565(0, 255, 0);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
display.begin(8);
display.flushDisplay();
display.setTextWrap(false);
display_ticker.attach(0.004, display_updater);
int16_t x1 = 0, y1 = 0;
display.getTextBounds(text.text, 0, 0, &x1, &y1, &text.width, &text.height);
text.width-=2;
text.height-=2;
}
int16_t x=0, dx=1;
void loop() {
// display.clearDisplay();
display.fillScreen(myBLACK);
display.setTextColor(textColor);
display.setCursor(0, 0);
display.print("P5-32");
display.setCursor(0, 8);
display.print("X328S");
display.setTextColor(display.color565(0, 55, 0));
display.setCursor(0, 16);
display.print("ESP -");
display.setCursor(0, 24);
display.print("8266");
display.drawLine(0,31,31,31,(display.color565(55, 0, 0)));
display.showBuffer();
delay(20);
}
```
Не в сети
Не в сети
Не в сети
```cpp
#include <Adafruit_GFX.h>
#include <Fonts/Picopixel.h>
#include <Fonts/TomThumb.h>
#include <Fonts/Tiny3x3a2pt7b.h>
#include <Fonts/Org_01.h>
#define double_buffer
#include <PxMatrix.h>
#include <Ticker.h>
Ticker display_ticker;
#define P_LAT 16
#define P_A 4
#define P_B 12
#define P_C 0
#define P_OE 2
// Pins for LED MATRIX
PxMATRIX display(32,32,P_LAT, P_OE,P_A,P_B,P_C);
void display_updater()
{ display.display(70);}
struct Text {
char *text;
uint16_t width, height;
int16_t x, y;
int16_t dx, dy;
} text = {"Hello", 0, 0, 0, 0, 1, 1};
uint16_t textColor = display.color565(0, 0, 55);
uint16_t myBLACK = display.color565(0, 0, 0);
uint16_t lineColor = display.color565(255, 0, 0);
uint16_t backgroundColor = display.color565(0, 255, 0);
#include <Arduino.h>
#include <ESPNtpClient.h>
#include <ESP8266WiFi.h>
#define SHOW_TIME_PERIOD 1000
int a=1;
int tempC;
int tempC1;
int tempC2;
long unsigned lastNTPtime2;
long unsigned lastNTPtime1;
long unsigned lastNTPtime;
/////////////////////////////////////////////////////////////////////////
void setup() {
WiFi.begin ("time", "12345678");
delay(5000);
NTP.setTimeZone (TZ_Etc_UTC);
configTime(7*3600, 0, "pool.ntp.org");
NTP.begin ();
delay(3000);
Serial.begin(9600);
display.begin(8);
display.flushDisplay();
display.setTextWrap(false);
display_ticker.attach(0.004, display_updater);
int16_t x1 = 0, y1 = 0;
display.getTextBounds(text.text, 0, 0, &x1, &y1, &text.width, &text.height);
text.width-=5;
text.height-=5;
}
int16_t x=0, dx=1;
void loop() {
display.fillScreen(myBLACK);
display.setTextColor(textColor);
display.setCursor(0, 30);
display.setFont(&Org_01);
display.setTextSize(0);
display.print(NTP.getDateStr ());
display.setCursor(0, 23);
display.setTextSize(2);
display.setFont(&TomThumb);
display.print(NTP.getTimeStr());
display.setTextSize(2);
display.setCursor(0, 8);
display.setFont(&Picopixel);
display.print(NTP.getTimeStr());
display.showBuffer();
delay(20);
}
```
Не в сети
Страницы 1