Commit 4d613f8e authored by Houkime's avatar Houkime

Merge branch 'master' of https://notabug.org/Houkime/godot-modbus-demo into master

parents 615dc1e7 a5220204
...@@ -14,7 +14,7 @@ No actual levels are there yet though, it is just a technical demo, but it is no ...@@ -14,7 +14,7 @@ No actual levels are there yet though, it is just a technical demo, but it is no
## Ok, how this works?: ## Ok, how this works?:
To be able to connect via modbus, libmodbus is used as the lowest level. To be able to connect via modbus, [libmodbus](https://github.com/stephane/libmodbus) is used as the lowest level.
For Godot engine, ability to use libmodbus is added by writing a shared object compiled against GDNative API - this allows Godot to call C functions from its usual GDscript internal scripting interface without the need to recompile the whole engine (unlike C/C++ modules that need to be compiled into engine itself). For Godot engine, ability to use libmodbus is added by writing a shared object compiled against GDNative API - this allows Godot to call C functions from its usual GDscript internal scripting interface without the need to recompile the whole engine (unlike C/C++ modules that need to be compiled into engine itself).
...@@ -36,10 +36,18 @@ Aside from using ModbusSpatial to send and receive some data, controllable devic ...@@ -36,10 +36,18 @@ Aside from using ModbusSpatial to send and receive some data, controllable devic
### 1. Install godot and libmodbus on your host machine. ### 1. Install godot and libmodbus on your host machine.
on Arch Linux and Manjaro: #### on Arch Linux and Manjaro:
``` ```
sudo pacman -S godot libmodbus sudo pacman -S godot
```
libmodbus can be fetched from AUR [https://aur.archlinux.org/packages/libmodbus-git/](https://aur.archlinux.org/packages/libmodbus-git/)
#### on Debian:
```
sudo apt install godot3 libmodbus5 libmodbus-dev
``` ```
### 2. Clone this repository ### 2. Clone this repository
...@@ -94,7 +102,7 @@ However, even if you're going text route, there is no CLI option for Godot to re ...@@ -94,7 +102,7 @@ However, even if you're going text route, there is no CLI option for Godot to re
### 5. Run ### 5. Run
Run with f5 with editor open or from terminal `godot Main.tscn` Run with f5 with editor open (at Main.tscn, not Pushertest.tscn) or from terminal `godot Main.tscn`
_Note: cd into the 'simple' folder if necessary - something inside Godot depends on terminal calling these commands from the folder and giving subtle errors in other cases, so you can't always do simple/Main.tscn from godot-modbus-demo_ _Note: cd into the 'simple' folder if necessary - something inside Godot depends on terminal calling these commands from the folder and giving subtle errors in other cases, so you can't always do simple/Main.tscn from godot-modbus-demo_
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment