Problem with Nextion

Hi all can someone help me please I am following this tutorial

to learn all about the Nextion displays.
I am coming up against an error:-

Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void ninePopCallback(void*)':

NumberPadUSBNextion:46:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('9');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void eightPopCallback(void*)':

NumberPadUSBNextion:49:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('8');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void sevenPopCallback(void*)':

NumberPadUSBNextion:52:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('7');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void sixPopCallback(void*)':

NumberPadUSBNextion:55:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('6');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void fivePopCallback(void*)':

NumberPadUSBNextion:58:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('5');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void fourPopCallback(void*)':

NumberPadUSBNextion:61:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('4');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void threePopCallback(void*)':

NumberPadUSBNextion:64:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('3');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void twoPopCallback(void*)':

NumberPadUSBNextion:67:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('2');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void onePopCallback(void*)':

NumberPadUSBNextion:70:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('1');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void backspacePopCallback(void*)':

NumberPadUSBNextion:73:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.press(KEY_BACKSPACE);

^~~~~~~~

NumberPadUSBNextion:73:18: error: 'KEY_BACKSPACE' was not declared in this scope

Keyboard.press(KEY_BACKSPACE);

^~~~~~~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void zeroPopCallback(void*)':

NumberPadUSBNextion:77:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('0');

^~~~~~~~

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void pointPopCallback(void*)':

NumberPadUSBNextion:80:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.write('.');

^~~~~~~~

Multiple libraries were found for "SoftwareSerial.h"
Used: C:\Program
Multiple libraries were found for "Keyboard.h"
Used: C:\Program
Multiple libraries were found for "HID.h"
Used: C:\Program
Multiple libraries were found for "Nextion.h"
Used: C:\Program
Multiple libraries were found for "SPI.h"
Used: C:\Program
Multiple libraries were found for "SD.h"
Used: C:\Users\Bob\Documents\Arduino\libraries\SD
Not used: C:\Program
exit status 1

Using library SoftwareSerial at version 1.0 in folder: C:\Program Files
Using library Keyboard at version 1.0.2 in folder: C:\Program Files
Using library HID at version 1.0 in folder: C:\Program Files
Using library ITEADLIB_Arduino_Nextion in folder: C:\Program Files
Using library SPI at version 1.0 in folder: C:\Program Files
Using library SD at version 1.2.4 in folder: C:\Users\Bob\Documents\Arduino\libraries\SD
exit status 1
'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?

Ihave no idea what is wrong can someone help please.

NumPadDis.ino (2.45 KB)

Hello Redpepperbob,

I strongly suspect that you have yet to read 'how to use this forum - please read' (there's a big clue in the title). When you've read it please modify your original post in line with the instructions, especially with regard to code tags for your error message and for posting code.

You are using a tutorial on Youtube. Surely the place to ask for help first is the author of the tutorial, s/he must be the expert on what they are showing, not us who didn't create the tutorial.

If you read the error message they tell you what the problem is, start from the first one:

C:\Users\Bob\Documents\Arduino\Projects\NumberPadUSBNextion-20191122T093433Z-001\NumberPadUSBNextion\NumberPadUSBNextion.ino: In function 'void ninePopCallback(void*)':

NumberPadUSBNextion:46:3: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
   Keyboard.write('9');

So, the message is asking if you have included Keyboard.h
Have you included it? If not then you need to.

If you are now wondering where you get Keyboard.h from then I refer you back to the tutorial, if it's any good it should tell you. If not then I question whether the tutorial is any good.

You might like to try my tutorial 'using Nextion displays with Arduino' at the top of the displays forum. If you use the methods in there and get stuck you can ask on here and I will try to help.

Good luck with your project.

I try emailing the auther no response. sorry for getting the code wrong
Thanks Perry

Bob

I try emailing the author no response.

Probably a good reason to not use the tutorial.