Go Down

Topic: Nextion Touch Button Abfrage (Read 427 times) previous topic - next topic

manolo-mm

Aug 11, 2018, 04:22 pm Last Edit: Aug 11, 2018, 06:41 pm by uwefed
Hi Leute

Ich hab mir grad ein Nextion Display geholt und stehe vor dem Problem das der Arduino die Touch Botton Events nicht mit bekommt. Daten ans Display senden geht. Hat jemand ne Idee?

Code: [Select]
#include <doxygen.h>
#include <NexButton.h>
#include <NexConfig.h>
#include <NexCrop.h>
#include <NexGauge.h>
#include <NexHardware.h>
#include <NexHotspot.h>
#include <NexObject.h>
#include <NexPage.h>
#include <NexPicture.h>
#include <NexProgressBar.h>
#include <NexSlider.h>
#include <NexText.h>
#include <Nextion.h>
#include <NexTouch.h>
#include <NexWaveform.h>

NexButton bGreen = NexButton(0, 2, "bGreen");
NexTouch *nex_listen_list[]{
  &bGreen,
  NULL
};


void setup() {
   Serial.begin(9600);
   bGreen.attachPush(bGreenPush);
   bGreen.attachPop(bGreenPop);
   pinMode(LED_BUILTIN, OUTPUT);

}

void loop() {

  nexLoop(nex_listen_list);


}

void bGreenPop(){
  digitalWrite(LED_BUILTIN, HIGH);
  
};

void bGreenPush(){
 digitalWrite(LED_BUILTIN, LOW);  
  
};

uwefed


Go Up