SpectralSensor Spectral Sensor Spektroskop + test wyświetlacza
This commit is contained in:
44
LeonardoProMicro/DisplayTest/DisplayTest.ino
Normal file
44
LeonardoProMicro/DisplayTest/DisplayTest.ino
Normal file
@@ -0,0 +1,44 @@
|
||||
#include <SPI.h>
|
||||
#include <Wire.h>
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_SSD1306.h>
|
||||
|
||||
Adafruit_SSD1306 display(4);
|
||||
|
||||
void setup() {
|
||||
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
|
||||
display.clearDisplay();
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
digitalWrite(5, LOW);
|
||||
delay(10);
|
||||
digitalWrite(5, HIGH);
|
||||
delay(3);
|
||||
|
||||
display.clearDisplay();
|
||||
display.setTextSize(1);
|
||||
display.setTextColor(WHITE);
|
||||
display.drawLine(0, 0, 120, 32, WHITE);
|
||||
display.drawRect(1, 1, 126, 30, WHITE);
|
||||
display.setCursor(4, 4);
|
||||
display.println("ELEKTRONIKA.PL");
|
||||
display.display();
|
||||
delay(2000);
|
||||
display.setCursor(10, 16);
|
||||
|
||||
display.println("SKLEP Z ELEKTRONIKA");
|
||||
display.display();
|
||||
display.clearDisplay();
|
||||
delay(3000);
|
||||
display.setCursor(4, 16);
|
||||
display.println("SUBSKRYBUJ TEN KANAL");
|
||||
display.display();
|
||||
delay(3000);
|
||||
|
||||
display.drawPixel(120, 30, WHITE);
|
||||
display.display();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user