Using C++ code from GitHub -- Need expert guidance!

I hope this is the best category for this post.

I have some limited experience with Arduino, but it’s been a while since my last project, and I’ve only used the Arduino IDE.

I’m considering replicating this Git-Hub / Arduino project, but before buying the components, wanted to get some feedback from someone who has done projects that use C++ code that was written in Visual Studio.

I have looked through the project’s Git-Hub files, but it's clearly intended for someone who has more experience--the project unfortunately doesn’t provide guidance that explains which parts of the code need to be uploaded to the Arduino.

Is there someone who could take an in-depth look at this Git-Hub project and then walk me through what the process of actually getting the code onto the Arduino will entail. From the reading I've done so far, this project will require several libraries and I'm not sure if these are included in the Git repository.

I’d also like to make sure that the Git-Hub code doesn’t have any major parts left out before I go ahead and order the components.

You ask helpers to use a lot of time evaluating an entire Git Hub project, and even verify the code. This would call for buying all the components in order to test.
One answer to that is "No". The other answer is: "What planet do You come from"?

You would be better off starting on your own to build such a system .

Railroader, I guess I should have explained things better.

I've not coded anything for the Arduino except using the IDE, and looking at the list of files on Git-Hub is pretty daunting for a novice. I did not want anyone to build the project, but only for someone who has more experience than I, to look at the project and outline how I would go about putting the code onto the Arduino.

On the GitHub page, there are the following items listed

.gitignore – I assume that this file won’t be loaded onto the Arduino
Intrusion_Alert.ino – I know this is an Arduino file, but I’m not sure exactly how to incorporate it with the other files listed.
The next 3 files (Intrusion_Alert.sln, Intrusion_Alert.vcxproj, Intrusion_Alert.vcxproj.filters) appear to be Visual Studio studio files, so they won’t be going onto the Arduino.
Listener.cpp – this is a c++ file. I’m not sure what to do with this.
Listener.h – It’s been a while, but I think I recall seeing .h files as part of a library.
Readme.md – clearly this won’t be going on the Arduino
ScrollDisplay.cpp – this is a c++ file. I’m not sure what to do with this.
ScrollDisplay.h – As above, maybe a library.

My overall questions are:

What do I do with Intrusion_Alert.ino, Listener.cpp, Listener.h, ScrollDisplay.cpp, and ScrollDisplay.h ? Do I just load them all onto the Arduino, or do I have to compile them first? Do I make them into one long sketch?

Is there anything that needs to be done with the Visual Studio files? I would’t expect that these would go onto the Arduino. Do I compile or otherwise process them and then put them on the Arduino?

I’ve never used Arduino in conjunction with files from Git-Hub, so I’m basically hoping that someone with experience might be able to give me some pointers on how to proceed here.

Thanks so much Railroader for your input on this, it has helped me crystallize the questions I have.

Create a directory Intrusion_Alert and place the .ino, .h and .cpp files in there.

Double click the .ino to open the project in the IDE.

Compile and start fixing the missing includes.

Thanks so much sterretje for your help. I’ve not done an Arduino project using files from GitHub before, and was not sure how to proceed.

From your perspective, do the Visual Studio files have any role in this, or were they probably placed on GitHub simply as a point of reference?

No bad feelings. You got a rough answer.
If You know c-programming You will manage rather well with Arduinos. I got half a day of c## 1991 and never used it....
It sounds like You're entering the Arduino world a very high level.
Selecting components, programming and managing projects is not like using Lego blocks. Code is like a virus, having all variations You can dream of, and more. Selecting, using devices is the same. There's often one way to do things the right way and billions of ways to get in trouble.
What's Your experience, Your knowledge?

I think that the code was developed in visual studio instead of the IDE. You can skip all the other files and see how far you get after finding the correct libraries.

I did a few Arduino projects about 4 or 5 years ago and have some programming experience with Visual Basic.

Those early projects taught me a lot about the pitfalls of integrating the worlds of software and getting motors, relays and switches to cooperate to do a task. It was a steep learning curve.

In the meantime, I’ve not done much with Arduino and logged onto the forum just today for the first time in years. Anyway, if you combine my novice level of experience and the fact that I’ve never used code from GitHub, I’m sure you can appreciate that I was in way over my head.

I just didn’t explain it very well, and I can see how my post must have come across as “Please do the work for me.” That wasn’t my intent; it just goes to show that its best to re-read before clicking the Post button.

From what I can see, it is quite straightforward.
There is a .ino file . In the same directory as that .ino, you copy in the two .h and two.cpp files. It is irrelevant how those files were originally created. You can simply use the Arduino IDE.
The hardware looks quite simple as well. Using sockets for all the modules is a good idea instead of direct soldering.

Adopting unknown code is hard. I know, being thrown into large unknown codes, languages, systems during many years.
The best way to start a project is making code to verify each component is working. Then Your wiring is good.
Then, read, inspect, check the imported code. It almost never does what You want.
You ask for prognosis. Read specs, start buying things and try.
Dry verifying a project is impossible for any expert. It just takes a terrible amount of time and will still be very uncertain.

Thanks sterretje, that certainly simplifies things, and gives me a solid starting point. You’ve certainly cleared up my initial confusion.

6v6gt, that’s a great idea to use sockets instead of soldering. I will add them to the shopping list of components.

That's a great point. I will do this as step 1.

It was pretty intimidating looking at the list of files on GitHub, but now, with everyone’s help I have a much better overview. I feel confident enough to purchase the components and see what issues arise going forward.

Thanks to everyone who posted. It’s great to be able to get this helpful feedback.

Good luck. We'll be here if You need it.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.