Notifications
Clear all

Keypad control not working

156 Posts
3 Users
24 Reactions
9,680 Views
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2542
 

@kobusven95 

My bad, that should have been setTextColor.

I don't have the MCUFRIEND_kbv include file(s) so I have to #define everything null to compile and I'm rushing so I tend to make a lot of typos (as if I didn't normally make any).

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@kobusven95)
Member
Joined: 2 years ago
Posts: 60
Topic starter  

   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2542
 
Posted by: @kobusven95

@will

I have removed all the queries and line prints, as well as the duplication after the 3rd call.

You're not quite done yet. The confirmCommand takes care of the confirmation, so the code referring to confkey is no longer required and should be replaced with the new function. 

That is, once confirmCommand has been called, if confirmation was NOT received, then the break should send it to the next level up. If the command has been confirmed, the following code will be executed. So confkey won't even be defined.

I'm sorry, I may be going too fast for you to keep up.

Please tell me if anything we've done so far has confused you and I'll try to slow down and explain it more fully.

I have one more change to suggest. I'll send it shortly but, in the mean time, do ask me any questions about the code I've written or how to implement in your sketch. It is imperative that you understand what's happening, so I definitely want you to ask any questions you have.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2542
 

Anything seems possible when you don't know what you're talking about.


   
kobusven95 reacted
ReplyQuote
(@kobusven95)
Member
Joined: 2 years ago
Posts: 60
Topic starter  

@will jip, you have lost me waaaay back, but I am trying to catch up. Just stuck on the void displayInfo

 

 


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2542
 

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@kobusven95)
Member
Joined: 2 years ago
Posts: 60
Topic starter  

@will, yes, this makes sense now. Busy changing the code. Then I will also do the same for the other lines to be printed.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2542
 

@kobusven95 

Hold back on changing the code for now. I'm working on replacing the original code with the same stuff updated to using the new modules. I'll hand it over to you later to check that I've done it right, so there's no need for both of us doing the same work.

Please work through the new code, maybe run some tests (I can't because I lack your libraries) to verify that they all work and that you understand all the code. Again, don't hesitate to ask why or how something works (or even why I did something a particular way).

Anything seems possible when you don't know what you're talking about.


   
kobusven95 reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2043
 

@kobusven95

I tried to verify the code after downloading libraries for,
Keypad.h
MCUFRIEND_kbv.h

files downloaded and installed,

keypad-master.zip
MCUFRIEND_kbv-master.zip

But still got a compile error too large to post.

 


   
ReplyQuote
(@kobusven95)
Member
Joined: 2 years ago
Posts: 60
Topic starter  

@will, can I upload it somewhere?


   
ReplyQuote
(@kobusven95)
Member
Joined: 2 years ago
Posts: 60

   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2542
 

@kobusven95 

I'll put the updates sketch in here so you'll be able to get it. Still working on it, lots to do.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@kobusven95)
Member
Joined: 2 years ago
Posts: 60
Topic starter  

   
ReplyQuote
(@kobusven95)
Member
Joined: 2 years ago
Posts: 60
Topic starter  

@will, Ok, I got the error sorted - it wanted it in the same string as the line above.

   displayInfo("Bridge move to","Loco Sched 2 selected",BLACK);
      delay (1000);
   displayInfo("Press C","To Confirm",BLACK);


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2542
 

@kobusven95 

 

Here's my version of the "adapted" sketch, it's quite a bit smaller than the original but I can't compile it, so I'll need you to try compiling it and reading it to verify that it does everything it's supposed to and nothing that it's not supposed to.

I've added a new subroutine to handle moving to sheds, so please examine it and ask questions and/or explain to me what's wrong with it.

I have had to make some adjustments to text messages and corrected some grammatical errors, please ensure that these changes are acceptable.

I have to make a big pot of stew now, so I'll be in and out sporadically for a couple of hours.

I named my version ModSet0.ino so that it wouldn't conflict or overwrite your version(s). lease let me know of any compile or runtime errors that you can't figure out. Just drag it to your desktop.

Talk to you later.

Anything seems possible when you don't know what you're talking about.


   
kobusven95 reacted
ReplyQuote
Page 3 / 11