VAŽNO! Ovdje pročitajte kako se registrirati na forum. Bez registracije, nećete biti u mogućnosti pisati na forumu.

Inkplate 6 i gui

Obavijesti od strane ekipe e-radionica.com, pravila foruma, pitanja vezana uz forum i web stranicu.
luka.stefanek#1214
Novak
Novak
Postovi: 9
Pridružen/a: sri tra 24, 2019 8:52 pm

Inkplate 6 i gui

Post Postao/la luka.stefanek#1214 » pon lip 28, 2021 1:23 pm

Kolega i ja želimo na Inkplate 6 prikazati gui na kojem će se ispisivati slike i vrijednosti senzora. Pokušao sam napraviti jednostavan program da se prikažu samo krug i trokut, ali kada se Inkplate upali sa prenesenim programom ništa se ne pojavljuje. Kontaktirali smo Davida Zovka koji nas je uputio na ovaj forum. Prilažem sliku čega želimo postići i program. Željeli bi vašu pomoć. Ako postoji nekakav mil u kojem vam mogu detaljnjije opisati problem molim vas ga pošaljite.
slika
glavni program sa trokutom i krugom
"
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
#ifndef ARDUINO_ESP32_DEV
#error "Wrong board selection for this example, please select Inkplate 6 in the boards menu."
#endif

//Adafruit library for BME680 Sensor
#include "pp.h"
#include "Inkplate.h" //Include Inkplate library to the sketch
#include <Adafruit_Sensor.h> //Adafruit library for sensors
#include "Wire.h"
//#include "BME280.h"
//#include "Adafruit_VEML6070.h"
uint8_t address = 0; // default address on e-r BME280 breakout
uint8_t mode = 3; // normal mode
uint8_t standby = 0; // recomeded for normal mode
uint8_t filter = 0; // filter off
uint8_t temp_overSample = 1; // oversampling temperat x1
uint8_t humi_overSample = 1; // oversampling humidity x1
uint8_t pres_overSample = 1;
//Adafruit_VEML6070 uv = Adafruit_VEML6070();
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
//BME280
// bme; // Create an object on Adafruit BME680 library
//(with no arguments sent to constructor, that means we are using I2C communication for BME680 sensor)

int n = 0; // Variable that keep track on how many times screen has been partially updated
void setup()
{
//bme.settings(address, mode, standby, filter, temp_overSample, humi_overSample, pres_overSample);

// bme.begin();
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextSize(2); // Set text scaling to two (text will be two times bigger than normal)
// uv.begin(VEML6070_1_T);

// Set up oversampling and filter initialization for the sensor
// 320*C for 150 ms
}

void loop(){
mainDraw;
if (n > 20)
{ // If display has been partially updated more than 20 times, do a full refresh, otherwise, perform a partial
// update.
display.display();
n = 0;
}
else
{
display.partialUpdate();
n++;
}

delay(2000);
}

"
#include "Arduino.h"
#include "Inkplate.h"


extern Inkplate display;


int triangle0_a_x = 100;
int triangle0_a_y = 100;
int triangle0_b_x = 500;
int triangle0_b_y = 500;
int triangle0_c_x = 100;
int triangle0_c_y = 500;
int triangle0_fill = 1;
int triangle0_radius = -1;
int triangle0_color = 0;

int circle0_center_x = 635;
int circle0_center_y = 282;
int circle0_fill = 1;
int circle0_radius = 100;
int circle0_color = 3;

void mainDraw() {

if (triangle0_fill != -1)
display.fillTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, triangle0_color);
else
display.drawTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, triangle0_color);

if (circle0_fill != -1)
display.fillCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color);
else
display.drawCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color);

}
"
robertperic#9547
e-radionica.com team
e-radionica.com team
Postovi: 11
Pridružen/a: pon ožu 08, 2021 12:31 pm

Re: Inkplate 6 i gui

Post Postao/la robertperic#9547 » uto lip 29, 2021 8:50 am

Pozdrav kolega, imate par stvari na koje trebate obratiti pažnju,
- na liniji 44 unutar loop funkcije gdje pozivate mainDraw fale vam zagrade, to je ujedno razlog zašto se ništa ne ispisuje, treba biti:

Kod: Označite sve

mainDraw();
- skrenut ću vam pažnju na inicijalizaciju na liniji 21:

Kod: Označite sve

Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
-ukoliko želite koristiti sive boje (grayscale), treba biti:

Kod: Označite sve

Inkplate display(INKPLATE_3BIT); // 
Sa INKPLATE_1BIT imate samo crno bijele, tj sve sive ce biti prikazane kao crne, ali ako želite da imate grayscale, trebate znati da tada ne možete koristiti display.partialUpdate() jer je to trenutno nemoguće implementirati.

Molim ako imate još pitanja pišite nam tu na forumu,
Lijep pozdrav.
luka.stefanek#1214
Novak
Novak
Postovi: 9
Pridružen/a: sri tra 24, 2019 8:52 pm

Re: Inkplate 6 i gui

Post Postao/la luka.stefanek#1214 » čet srp 01, 2021 3:26 pm

Dobar dan kolega. pokušao sam to što ste predložili, ali nije uspjelo još uvijek je sve bilo prazno. Onda sam odlućio probati napraviti dizajn kao na slici. S time sam naišao na par problema 1. dobijem error kod da font nije pronađen u librariju (Arduino: 1.8.10 (Windows 10), Board: "Inkplate 6 (ESP32), Enabled, Huge APP (3MB No OTA), 240MHz (WiFi/BT), 115200, None"

In file included from D:\inkplatebme280\inkplatebme280.ino:9:0:

Multiple libraries were found for "SimpleBLE.h"
preporuke.h:5:38: error: Fonts/FreeSansbold24pt7b.h: No such file or directory

Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\SimpleBLE
compilation terminated.

Multiple libraries were found for "Wire.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\Wire
Multiple libraries were found for "Inkplate.h"
Used: C:\Users\lukat\Documents\libraries\InkplateLibrary
Multiple libraries were found for "SPI.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\SPI
Multiple libraries were found for "HTTPClient.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\HTTPClient
Multiple libraries were found for "WiFiClient.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\WiFi
Not used: C:\Program
Not used: C:\Users\lukat\Documents\libraries\WiFi101
Multiple libraries were found for "WiFiClientSecure.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\WiFiClientSecure
exit status 1
Fonts/FreeSansbold24pt7b.h: No such file or directory

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences. )

2. Kada dodam adafruit gfx library piše da font nije definiran (Arduino: 1.8.10 (Windows 10), Board: "Inkplate 6 (ESP32), Enabled, Huge APP (3MB No OTA), 240MHz (WiFi/BT), 115200, None"

In file included from sketch\preporuke.h:11:0,

from D:\inkplatebme280\inkplatebme280.ino:9:

C:\Users\lukat\Documents\libraries\Adafruit_GFX_Library/Fonts/FreeSansBold24pt7b.h:1:41: error: redefinition of 'const uint8_t FreeSansBold24pt7bBitmaps []'

const uint8_t FreeSansBold24pt7bBitmaps[] PROGMEM = {

^

In file included from sketch\preporuke.h:10:0,

from D:\inkplatebme280\inkplatebme280.ino:9:

C:\Users\lukat\Documents\libraries\Adafruit_GFX_Library/Fonts/FreeSansbold24pt7b.h:1:15: note: 'const uint8_t FreeSansBold24pt7bBitmaps [8143]' previously defined here

const uint8_t FreeSansBold24pt7bBitmaps[] PROGMEM = {

^

In file included from sketch\preporuke.h:11:0,

from D:\inkplatebme280\inkplatebme280.ino:9:

C:\Users\lukat\Documents\libraries\Adafruit_GFX_Library/Fonts/FreeSansBold24pt7b.h:682:41: error: redefinition of 'const GFXglyph FreeSansBold24pt7bGlyphs []'

const GFXglyph FreeSansBold24pt7bGlyphs[] PROGMEM = {

^

In file included from sketch\preporuke.h:10:0,

from D:\inkplatebme280\inkplatebme280.ino:9:

C:\Users\lukat\Documents\libraries\Adafruit_GFX_Library/Fonts/FreeSansbold24pt7b.h:682:16: note: 'const GFXglyph FreeSansBold24pt7bGlyphs [95]' previously defined here

const GFXglyph FreeSansBold24pt7bGlyphs[] PROGMEM = {

^

In file included from sketch\preporuke.h:11:0,

from D:\inkplatebme280\inkplatebme280.ino:9:

C:\Users\lukat\Documents\libraries\Adafruit_GFX_Library/Fonts/FreeSansBold24pt7b.h:779:15: error: redefinition of 'const GFXfont FreeSansBold24pt7b'

const GFXfont FreeSansBold24pt7b PROGMEM = {

^

In file included from sketch\preporuke.h:10:0,

from D:\inkplatebme280\inkplatebme280.ino:9:

C:\Users\lukat\Documents\libraries\Adafruit_GFX_Library/Fonts/FreeSansbold24pt7b.h:779:15: note: 'const GFXfont FreeSansBold24pt7b' previously defined here

const GFXfont FreeSansBold24pt7b PROGMEM = {

^

In file included from D:\inkplatebme280\inkplatebme280.ino:9:0:

preporuke.h:18:30: error: 'FreeSansbold24pt7b' was not declared in this scope

const GFXfont *text0_font = &FreeSansbold24pt7b;

^

D:\inkplatebme280\inkplatebme280.ino: In function 'void loop()':

inkplatebme280:45:11: error: 'preDraw' was not declared in this scope

preDraw();

^

Multiple libraries were found for "SimpleBLE.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\SimpleBLE
Multiple libraries were found for "Adafruit_Sensor.h"
Used: C:\Users\lukat\Documents\libraries\Adafruit_Sensor-master
Not used: C:\Users\lukat\Documents\libraries\Adafruit_Unified_Sensor
Multiple libraries were found for "Adafruit_GFX.h"
Used: C:\Users\lukat\Documents\libraries\Adafruit_GFX_Library
Not used: C:\Users\lukat\Documents\libraries\Adafruit-GFX-Library-master
Multiple libraries were found for "SPI.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\SPI
Multiple libraries were found for "Inkplate.h"
Used: C:\Users\lukat\Documents\libraries\InkplateLibrary
Multiple libraries were found for "WiFiClient.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\WiFi
Not used: C:\Program
Not used: C:\Users\lukat\Documents\libraries\WiFi101
Multiple libraries were found for "HTTPClient.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\HTTPClient
Multiple libraries were found for "WiFiClientSecure.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\WiFiClientSecure
Multiple libraries were found for "Wire.h"
Used: C:\Users\lukat\AppData\Local\Arduino15\packages\Croduino_Boards\hardware\Inkplate\1.0.1\libraries\Wire
Multiple libraries were found for "Adafruit_I2CDevice.h"
Used: C:\Users\lukat\Documents\libraries\Adafruit_BusIO
exit status 1
'FreeSansbold24pt7b' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.)

Kod sam dobio sa vašeg gui dizajnera.
Veselim se i iščekujem vašu pomoć.
Privitak/ci
Novo WinRAR ZIP arhiva.zip
(4.83 KiB) Preuzeto 5 puta.
robertperic#9547
e-radionica.com team
e-radionica.com team
Postovi: 11
Pridružen/a: pon ožu 08, 2021 12:31 pm

Re: Inkplate 6 i gui

Post Postao/la robertperic#9547 » pet srp 02, 2021 7:41 am

Pozdrav kolega,
evo kod koji sam koristio i rezultat koji sam dobio.

Kod: Označite sve

// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
#ifndef ARDUINO_ESP32_DEV
#error "Wrong board selection for this example, please select Inkplate 6 in the boards menu."
#endif

//Adafruit library for BME680 Sensor
#include "pp.h"
#include "Inkplate.h" //Include Inkplate library to the sketch
#include <Adafruit_Sensor.h> //Adafruit library for sensors
#include "Wire.h"
//#include "BME280.h"
//#include "Adafruit_VEML6070.h"
uint8_t address = 0; // default address on e-r BME280 breakout
uint8_t mode = 3; // normal mode
uint8_t standby = 0; // recomeded for normal mode
uint8_t filter = 0; // filter off
uint8_t temp_overSample = 1; // oversampling temperat x1
uint8_t humi_overSample = 1; // oversampling humidity x1
uint8_t pres_overSample = 1;
//Adafruit_VEML6070 uv = Adafruit_VEML6070();
Inkplate display(INKPLATE_3BIT); // Create an object on Inkplate library and also set library into 1 Bit mode (BW)
//BME280
// bme; // Create an object on Adafruit BME680 library
//(with no arguments sent to constructor, that means we are using I2C communication for BME680 sensor)

int n = 0; // Variable that keep track on how many times screen has been partially updated
void setup()
{
//bme.settings(address, mode, standby, filter, temp_overSample, humi_overSample, pres_overSample);

// bme.begin();
Serial.begin(115200);
display.begin(); // Init Inkplate library (you should call this function ONLY ONCE)
display.clearDisplay(); // Clear frame buffer of display
display.display(); // Put clear image on display
display.setTextSize(2); // Set text scaling to two (text will be two times bigger than normal)
// uv.begin(VEML6070_1_T);

// Set up oversampling and filter initialization for the sensor
// 320*C for 150 ms
}

void loop(){
mainDraw();

display.display();

delay(20000);
}
i za GUI pp.h file.

Kod: Označite sve

#include "Arduino.h"
#include "Inkplate.h"


extern Inkplate display;


int triangle0_a_x = 100;
int triangle0_a_y = 100;
int triangle0_b_x = 500;
int triangle0_b_y = 500;
int triangle0_c_x = 100;
int triangle0_c_y = 500;
int triangle0_fill = 1;
int triangle0_radius = -1;
int triangle0_color = 3;

int circle0_center_x = 635;
int circle0_center_y = 282;
int circle0_fill = 1;
int circle0_radius = 100;
int circle0_color = 3;

void mainDraw() {

if (triangle0_fill != -1)
display.fillTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, triangle0_color);
else
display.drawTriangle(triangle0_a_x, triangle0_a_y, triangle0_b_x, triangle0_b_y, triangle0_c_x, triangle0_c_y, triangle0_color);

if (circle0_fill != -1)
display.fillCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color);
else
display.drawCircle(circle0_center_x, circle0_center_y, circle0_radius, circle0_color);

}

slika


A za fontove vam vjerovatno fali direktorij koji mozete naci tu:
https://github.com/e-radionicacom/Inkpl ... er_example
Mislim da se tu nalaze svi fontovi koje GUI tool inace koristi, ovaj fonts direktorij mozete naci u inkplate library direktoriju unutar documents/Arduino/libraryes/examples

lijep pozdrav :D
ivan.fadiga#4726
e-radionica.com team
e-radionica.com team
Postovi: 237
Pridružen/a: ned tra 15, 2018 2:59 pm
Lokacija: Osijek

Re: Inkplate 6 i gui

Post Postao/la ivan.fadiga#4726 » pet srp 02, 2021 7:47 am

Pozdrav,
Jeste probali bilo koji drugi primjer koji se može naći u Arduino IDE pod File>Examples>Inkplate da provjerite radi li Inkplate ili ne.
Ako ste to već napravili i sve radi onda možete probati što predlaže Robert.

LP,
Ivan
luka.stefanek#1214
Novak
Novak
Postovi: 9
Pridružen/a: sri tra 24, 2019 8:52 pm

Re: Inkplate 6 i gui

Post Postao/la luka.stefanek#1214 » pet srp 02, 2021 8:05 pm

Dobar dan, vaš kod uspješno radi na Inkplateu i na tome vam se zahvaljujem. Sada sam pokušao napraviti primjer koji sam pokušao napraviti gui na slici koju sam poslao, ali su mi fontovi još uvijek problem, stalno dolazi obavijest da fonta nema. Kada sam pokušao dodati file sa fontom govori mi da je došlo do redefinicije fonta. Kada sam pogledao u library vidio sam da su svi fontovi uredu i na mjestu. Želio bih vašu pomoć i unaprijed se zahvaljujem. LIjep pozdrav i ugodan dan Luka
robertperic#9547
e-radionica.com team
e-radionica.com team
Postovi: 11
Pridružen/a: pon ožu 08, 2021 12:31 pm

Re: Inkplate 6 i gui

Post Postao/la robertperic#9547 » pon srp 05, 2021 7:32 am

Pozdrav, moze taj novi kod pa da ja pogledam sta bi mogao biti problem, posaljite oba filea :)
luka.stefanek#1214
Novak
Novak
Postovi: 9
Pridružen/a: sri tra 24, 2019 8:52 pm

Re: Inkplate 6 i gui

Post Postao/la luka.stefanek#1214 » pon srp 05, 2021 11:21 am

Naravno kolega, hvala vam na upornosti.
Privitak/ci
program5.7.zip
program za print program sa gui dizajnera i file od fonta koji je u programu.
(4.93 KiB) Preuzeto 5 puta.
robertperic#9547
e-radionica.com team
e-radionica.com team
Postovi: 11
Pridružen/a: pon ožu 08, 2021 12:31 pm

Re: Inkplate 6 i gui

Post Postao/la robertperic#9547 » pon srp 05, 2021 12:08 pm

Bok, ovako. Imali ste par bugova;
-naime font vam nije prepoznalo jer ste krivo napisali ime fonta, nista strasno,
-u loop ste koristili preDraw, a funkcija se zove mainDraw,
-file sa fontom vam je bio prazan pa sam vam ja tu u zip ubacio direktorij sa fontovima.
-isto sam primijetio da je UI malo zbrkan, kada koristite GUI tool, obavezno postavite inkplate6, pretpostavljam da imate sesticu.

-Kod sam vam fixao tako da bi sada trebalo da se moze uploadati, ali UI cete morati prepraviti :D



slika
Privitak/ci
inkplatebme280.zip
(311.82 KiB) Preuzeto 5 puta.
luka.stefanek#1214
Novak
Novak
Postovi: 9
Pridružen/a: sri tra 24, 2019 8:52 pm

Re: Inkplate 6 i gui

Post Postao/la luka.stefanek#1214 » uto srp 06, 2021 11:07 am

Dobar dan kolega u pokušaju da popravim gui sam napravio probni program kako bi saznao kako se veličina teksta mijenja. No kada sam prenio program na inkplate sva tri teksta su iste veličine iako tako nisam postavio u GUI dizajneru. U generiranom programu sam zamijetio da nigdje nema comande za mijenjanje velićine fonta koja je prikazana u gui dizajneru (npr. 64 px 32px itd.) jer display.setTextSite mijenja sam scaling . Molim vas za vašu pomoć prilažem json gui dizajnera te programe kojima se koristim zajedno sa slikom ishoda.
slika
Privitak/ci
fonttestiranje.7z
(7.8 KiB) Preuzeto 5 puta.
robertperic#9547
e-radionica.com team
e-radionica.com team
Postovi: 11
Pridružen/a: pon ožu 08, 2021 12:31 pm

Re: Inkplate 6 i gui

Post Postao/la robertperic#9547 » uto srp 06, 2021 2:22 pm

Pozdrav, da font se ne zadrzava trenutno, morate ga promijeniti sami u generatedUI.h,
Dodao sam vam komentare za to dole.

Kod: Označite sve

#include <Inkplate.h>


#include "Arduino.h"

//tu dodajte nove fontove kao sto je ovaj dole, obavezno ih ubacite u direktorij, imate ih u onom zipu sto sam vam slao
#include "FreeSansBold24pt7b.h"

extern Inkplate display;

String text0_content = "Hello there!";
int text0_cursor_x = 272;
int text0_cursor_y = 181;
const GFXfont *text0_font = &FreeSansBold24pt7b;	//ovdje promijenite font koji zelite, tu postavljate da li je bold ili ne, i koja mu je velicina za taj string

String text1_content = "Hello World";
int text1_cursor_x = 427;
int text1_cursor_y = 229;
const GFXfont *text1_font = &FreeSansBold24pt7b;

String text2_content = "Hello World";
int text2_cursor_x = 505;
int text2_cursor_y = 266;
const GFXfont *text2_font = &FreeSansBold24pt7b;

void mainDraw() {
    display.setFont(text0_font);
    display.setTextColor(0, 7);    display.setTextSize(1);    display.setCursor(text0_cursor_x, text0_cursor_y);
    display.print(text0_content);

    display.setFont(text1_font);
    display.setTextColor(0, 7);    display.setTextSize(1);    display.setCursor(text1_cursor_x, text1_cursor_y);
    display.print(text1_content);

    display.setFont(text2_font);
    display.setTextColor(0, 7);    display.setTextSize(1);    display.setCursor(text2_cursor_x, text2_cursor_y);
    display.print(text2_content);

}
luka.stefanek#1214
Novak
Novak
Postovi: 9
Pridružen/a: sri tra 24, 2019 8:52 pm

Re: Inkplate 6 i gui

Post Postao/la luka.stefanek#1214 » sri srp 07, 2021 10:24 am

Pozadrav kolega! Uz vašu pomoć sam uspio prikazati prvi dizajn GUI-a u nekom prihvatljivom stanju. Došao sam do novog problema do kojeg dolazi kada sam pokušao dodati drugi dizajn. Kada sam program pokušao prebaciti na Inkplate6 javlja mi da je došlo do redefinicije fonta. Molim vas za vašu pomoć. Šaljem vam zip sa svi dizajnima, glavnim programom i nekim fontovima. Unaprije zahvaljujem na pomoći.
Privitak/ci
popravljennk.zip
(363.59 KiB) Preuzeto 6 puta.
robertperic#9547
e-radionica.com team
e-radionica.com team
Postovi: 11
Pridružen/a: pon ožu 08, 2021 12:31 pm

Re: Inkplate 6 i gui

Post Postao/la robertperic#9547 » čet srp 08, 2021 11:29 am

Poz, mozes poslati ispis sa seriala, ne znam koje sve librarieje imate instalirane pa me to malo zeza u arduinu.
luka.stefanek#1214
Novak
Novak
Postovi: 9
Pridružen/a: sri tra 24, 2019 8:52 pm

Re: Inkplate 6 i gui

Post Postao/la luka.stefanek#1214 » čet srp 08, 2021 1:28 pm

Dobar dan kolega. Došao smo do alternative prikazivanja GUI-a. GUI smo pretvorili u bitmap datoteku koji ispisujemo pomoću display.drawBitmap3Bit();. Kada sam pokušao ispisati vrijednost senzora ispisala mi se samo bitmapa a ne senzori. Htio sam vas pitati postoji li mogućnost postavljanja bitmape u pozadinu, drugi plan ili vrijednost senzora u prvi plan? Molim za pomoć, šaljem program i unaprijed se zahvaljujem.
Privitak/ci
testbitmap.rar
(537.63 KiB) Preuzeto 4 puta.
robertperic#9547
e-radionica.com team
e-radionica.com team
Postovi: 11
Pridružen/a: pon ožu 08, 2021 12:31 pm

Re: Inkplate 6 i gui

Post Postao/la robertperic#9547 » čet srp 08, 2021 3:44 pm

Mozete, ako ste ostavili prostor za vrijednosti senzora, mozete prvo nacrtati sliku, a zatim promijeniti na inkplate 1bit i koristiti partialUpdate bez clearDisplay. To ce zadrzati staro stanje displeja i prikazati nove podatke. Ali morate to sve raditi pri svakom novom prikazu vrijednosti.
Odgovorite