https://github.com/yoboujon/badapple-phoenixcontact-do32
"Bad Apple!" on the Phoenix Contact "AXL F DO32/1 1F" using libmodus
https://github.com/yoboujon/badapple-phoenixcontact-do32
bad-apple cpp meme modbus
Last synced: 17 days ago
JSON representation
"Bad Apple!" on the Phoenix Contact "AXL F DO32/1 1F" using libmodus
- Host: GitHub
- URL: https://github.com/yoboujon/badapple-phoenixcontact-do32
- Owner: yoboujon
- License: agpl-3.0
- Created: 2024-01-26T14:54:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-26T15:32:02.000Z (over 2 years ago)
- Last Synced: 2025-06-18T02:39:30.835Z (about 1 year ago)
- Topics: bad-apple, cpp, meme, modbus
- Language: C++
- Homepage:
- Size: 4.76 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.MD
- License: LICENSE
Awesome Lists containing this project
README
# Bad Apple! On the Phoenix Contact `AXL F DO32/1 1F`
This little project has been made to test out the guts this module can have. I don't plan to modify this code in the future.
## How to build the project
### Downloading the libraries
#### 🌍 Libmodbus
Under the `vendor` folder inside `libmodbus` you will have to go in a bash and type those commands :
```sh
mkdir bin
mkdir lib
mkdir include
```
Download the latest Windows x64 version of the libmodbus [here](https://github.com/stephane/libmodbus/wiki/Compile-dll-under-Windows-with-Visual-Studio-2008-Express). Copy the **Release** `.lib` and put it in the `lib` folder, do the same for the `.dll` inside the bin, and then copy and paste all the header files.
#### 💡 OpenCV
Under the `vendor` folder inside `opencv` you will have to go in a bash and type those commands :
```sh
mkdir bin
mkdir lib
mkdir include
```
Download the latest OpenCV for Windows [here](https://opencv.org/releases/). Inside the extracted folder go to "opencv\build\x64\vc16", copy both `lib` and `bin` folders. then go to "opencv\build\include" and copy its content in the `include` folder.
### Compiling
This code only compiles on Windows unfortunetly, to compile, go to the root folder and create the build folder :
```sh
mkdir build
cd build
```
Then you can build in two build modes:
```sh
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --config Debug
```
or
```sh
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
```
**Simply run the program afterwards!**
### ❗ If you are using CMake on Visual Studio Code ❗
Be sure that in your `settings.json` you add the following lines:
```json
"cmake.configureSettings": {
"CMAKE_BUILD_TYPE": "${buildType}"
}
```
Otherwise it won't compile. The library used (mainly openCV) requires a build type for each `.dll`/`.lib`.