sstaub / nextionx2 Goto Github PK
View Code? Open in Web Editor NEWLibrary for Nextion displays
License: MIT License
Library for Nextion displays
License: MIT License
Hello,
Excellent library. I am enjoying it.
I have a gauge on the display with a value 90 as it's default value. I send an Arduino command to set it to 180 and the dial moves to 180. However, it is still showing the old 90 value dial hand. So basically I have two dial hands; one at 90 and the other at 180. Is there some clear command I should put in prior to changing the value?
I tried both these ways:
NextionComponent gauge0(nextion, 0, 2);
void loop(){
//gauge0.value(180);
gauge0.attribute("val", 180);
}
thanks for the help.
Hi,
I'm just here for advice this is not really a bug in Nextion X2 library. What I experience is that when I add some additional logic to the loop-method it doesn't trigger my btnStepUp
method any more. When I disable the sensor check it does work. I presume it's because the Nextion display already sent the data but the arduino is not listening because it's busy checking IO ports. Do you have experience on how to handle this?
#include "NextionX2.h"
#include "SoftwareSerial.h"
#include <ezButton.h>
SoftwareSerial SerialNextion(PA10, PA9);
NextionComPort nextion;
#define topPin PB10
NextionComponent btUp(nextion, 0, 8);
ezButton topSensor(topPin);
void setup()
{
nextion.begin(SerialNextion);
pinMode(LED_BUILTIN, OUTPUT);
btUp.touch(btnStepUp);
}
bool initDone = false;
void loop()
{
nextion.update();
/// If this is enabled nextion touch trigger doesn't work anymore
// topSensor.loop();
// if (dir == CCW && topSensor.getState() == LOW)
// {
// topPosition = stepper.currentPosition();
// dir = CW;
// }
// I also tried to add another update() at the end of the loop but no difference
// nextion.update();
}
void btnStepUp()
{
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
}
Hi, first off, thanks for taking the time to author such a great library! With it I have been almost able to do everything i want BUT
There seems to be a limitation on the amount of characters we can use with
item.text() function as well as item.attribute("txt", )
I am trying to write a long (113 char) url to the text attribute of a QRCode object but it would seem there is a limitation of about 30-40 characters. Smaller strings work fine.
Causes a CPU crash and reset...
Platform: ESP32
Stack smashing protect failure!
abort() was called at PC 0x4013820b on core 1
ELF file SHA256: 0000000000000000
Backtrace: 0x40089214:0x3ffb1e10 0x40089491:0x3ffb1e30 0x4013820b:0x3ffb1e50 0x400d0eb1:0x3ffb1e70 0x400d14c9:0x3ffb1ed0 0x400d1a2a:0x4f4e4d4c
Rebooting...
```
`
A get Page function is missing. For each comPort there should a variable for the recent page number. Also a callback for page change is needed and a dedicated setPage function.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.