Arduino Forum

International => Deutsch => Topic started by: manolo-mm on Aug 11, 2018, 04:22 pm

Title: Nextion Touch Button Abfrage
Post by: manolo-mm on Aug 11, 2018, 04:22 pm
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);  
  
};
Title: Re: Nextion Touch Button Abfrage
Post by: uwefed on Aug 11, 2018, 06:42 pm
Welcher Arduino?