Code Monkey home page Code Monkey logo

nextionx2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nextionx2's Issues

Write Gauge value to display not deleting prior value

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.

Touch trigger isn't fired when checking IO

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));
}

Maximum text length limitation

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...
```
`

getPage

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.