GitHub Actions:
This project shows how to use Pi4J with Maven for various electronic components connected to the Raspberry Pi.
See Pi4J website.
It's strongly recommended to use the Linux image Pi4J-Basic-OS and IntelliJ IDEA as IDE on your developer machine. But, of course, you can use any other IDE and use maven commands to experiment with our component catalogue.
In IntelliJ IDEA ready-made run-configurations are available for running the demo application on the RaspPi.
pom.xml
<pi.hostname>
and <pi.ipnumber>
Run on Pi
compiles and packages the demo application on your developer machine, deploys it to Raspberry Pi and starts the demo application remotely on the Raspberry PiOnce you have started the demo application on Raspberry Pi using Run on Pi
, you can restart it without recompiling
Rerun version on Pi
starts the demo application remotely on the Raspberry Pi without applying any changesTo start the application on the Raspberry Pi in debug mode, two run configurations are required: Debug on Pi
and Attach to Pi Debugger
.
The sequence of starting the run configurations is critical:
pom.xml
Debug on Pi
using the Run button Listening for transport dt_socket at address: 5005 (Attach debugger)
Attach to Pi Debugger
using the Debug buttonNow you can use the debugger from IntelliJ IDEA, setting breakpoints and stepping through the application.
The output to console is in Debug on Pi
tab the debugger output in Attach to Pi Debugger
tab. You have to switch between these tabs.
Pi4J Version 2.0 and later is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.