Nextion + LEDs + Bu...
 
Notifications
Clear all

Nextion + LEDs + Button Matrix

6 Posts
5 Users
0 Likes
4,025 Views
(@vickyracer)
New Member
Joined: 4 years ago
Posts: 2
Topic starter  

I looked for information about this but i couldnt find nothing.

Does anyone know if it is possible to it. My goal is to create a steering wheel with LEDs and screen and using only one arduino Micro instead of two.

Thanks in advance.

 

Cheers


   
Quote
(@admin5435)
Prominent Member Admin
Joined: 7 years ago
Posts: 727
 

Yes it's possible see https://github.com/SHWotever/SimHub/wiki/Nextion-Display#wiring-nextion-through-an-arduino-micro you just have to add your own button matrix code to the example sketch provided

Nicolas


   
ReplyQuote
(@vickyracer)
New Member
Joined: 4 years ago
Posts: 2
Topic starter  

I am noob with programming...

My idea is to use this sketch:

https://imgur.com/a/nG56OkV

 

But I don`t know which part of the code I have to copy.

This post was modified 4 years ago 2 times by vickyracer

   
ReplyQuote
(@kjekki)
New Member
Joined: 4 years ago
Posts: 1
 

@vickyracer Did you solve this? I am curious of your program.


   
ReplyQuote
(@javikas)
Active Member
Joined: 3 years ago
Posts: 7
 

@vickyracer, as Wotever pointed you, you need to create your own sketch starting from the example located at C:\Program Files (x86)\SimHub\_Addons\NextionMicroBridge

This sketch presents the basic structure of serial communication for reading data from SimHub to control LEDs and sending data from buttons.

But notice that readButtons() function is just a basic example of reading buttons associated with Arduino pins directly to later use the Joystick library and send the push code to the host.
What you need to do is implement that function with the use of a matrix, or with multiplexers or shift registers or however you want to manage your configuration.

If you are going to use a matrix, your options are to do it entirely yourself or to use a library to simplify development.
One of the most used is Keypad ( https://github.com/Nullkraft/Keypad )

But I am very afraid that it's a bit hasty for you to get into something like that without programming knowledge. This is not something difficult for any programmer with little experience, it's in fact a very simple task for us, but you must necessarily start by learning it a little.

I have no problem helping you with questions that arise, but you need to understand the basic questions of C ++ programming, Arduino and the use of libraries.

By the way, the image you attach with the pin scheme you want to use is not valid. WS2812B LEDs (or any other LED configuration with an integrated circuit) require a pin with pulse width modulation (PWM) capability. On the Pro Micro, as you can see from the color code, only pins 3, 5, 6, 9 and 10 can modulate the pulse.

Cheers

This post was modified 3 years ago 2 times by javikas

   
ReplyQuote
(@jooo00078)
New Member
Joined: 2 years ago
Posts: 1
 

@javikas 

Hii, 

I have an arduino Micro and I would like to know if it was possible to make a program with nextion, button matrix, rotary encoders and WS1228B leds?

Knowing that I'm really not good at programming.


   
ReplyQuote
Share: