Loconet inteface and PCA9685

I found this sketch on a Youtube channel as I am trying to setup a Loconet interface on my Model Railway and this board with the Nano can control turnouts but when I came to look at the sketch it has a library that I cant find “Keypad_MC16.h” as anyone ever seen such a library or could it be the person who designed board made …I wasnt sure how to include the sketch also its not mine so dont want to affend Admin …

Hi @John40131.

Please provide a link to the place where you found the sketch in a reply here on this forum thread.

That may provide the forum helpers with important context that will allow us to more effectively assist you.

Anything in those search results? keypad_mc16 at DuckDuckGo

First link shows a Keypad_MC16.cpp / Keypad_MC16.h.

I did not look further into the details.

This was the web page I found for the project, there is a link to the Github page as well …

Thanks for the link I will have a look later, I D/L the file and its in notepad++ so can easily save …

John

First question is if you need Keypad_MC16; are you using a MCP23016?

If yes

If you haven't installed the Keypad library you will have to install that as well; you can use the library manager for that.

To be honest i’m not sure how this board will work, I want to interface to iTrain software and the DCCEX CSB1 Command Station which is a dedicated board using an ESP32 and 8874 Motor shield combined … I can get the board made at JLCPCB for not much money if it doesnt work I’ve not loost much … at the Moment I have a DS101 and a DS104 from … https://modelrailelectronics.com/en/shop-category/loconet/ … he is still developing sketch but I think the DS101 sketch is similar to the one shown by Luca Dentella …

I don't know much about this stuff. It does not look like the board (LocoNet | Arduino Interface – Losse Eindj.es by Curious Timo) uses a port expander so you don't need the library that you can't find.

The page above also has a video (https://www.youtube.com/watch?v=EKkzLZpOJWU) which mentions a library (with examples) that you can install.

Thanks for information, the board looks another interesting design but I think the interface for Loconet are very similar, the board I have the DS101 seems to see the USB on the Laptop when connected to iTrain but iTrain sends a signal but no response from the DS101 but I dont have the sketch for this DS101, so I'll build up the board I am having made at JLCPCB and see if that works ...

Yes I also have the Loconet library on this Laptop ...

Regards John

(attachments)

Because you linked the curioustime board I thought it was about that board.

I don't think I can help further, sorry.

@John40131 did you follow the instructions @sterretje provided in post #6? If so, are you now able to compile the sketch without encountering that error about Keypad_MC16.h?

I’m waiting for PCB to arrive from JLCPCB then I will look at assembly and testing with the sketch …