Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DieterHolz committed Jun 28, 2023
1 parent c92c87e commit 75c1045
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
14 changes: 3 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<launcher.args>--demo</launcher.args>

<!-- Raspberry Remote Deployment -->
<pi.ipnumber/>
<pi.ipnumber>pi4j.local</pi.ipnumber>
<pi.port>22</pi.port>
<pi.username>pi</pi.username>
<pi.password>pi4j</pi.password>
Expand Down Expand Up @@ -232,11 +232,7 @@
<!-- Run the JAR file locally -->
<profile>
<id>local-run</id>
<activation>
<property>
<name>!pi.ipnumber</name>
</property>
</activation>

<build>
<plugins>
<plugin>
Expand All @@ -262,11 +258,7 @@
<!-- Transfer and run JAR with dependencies on remote Raspberry -->
<profile>
<id>remote-run</id>
<activation>
<property>
<name>pi.ipnumber</name>
</property>
</activation>

<build>
<plugins>
<plugin>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/pi4j/catalog/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ protected String[] getProviders() {
}
})
.add(PiGpioDigitalInputProvider.newInstance(piGpio),
PiGpioDigitalOutputProvider.newInstance(piGpio) //,
// PiGpioPwmProvider.newInstance(piGpio),
// PiGpioSerialProvider.newInstance(piGpio),
// PiGpioSpiProvider.newInstance(piGpio),
// LinuxFsI2CProvider.newInstance()
PiGpioDigitalOutputProvider.newInstance(piGpio),
PiGpioPwmProvider.newInstance(piGpio),
PiGpioSerialProvider.newInstance(piGpio),
PiGpioSpiProvider.newInstance(piGpio),
LinuxFsI2CProvider.newInstance()
)
.build();
// Run the application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private void continuousSlowRead(Context pi4j) {
//start test
System.out.println("Continuous slow read test started ...");

Ads1115 ads1115 = new Ads1115(pi4j, 0x1, Ads1115.GAIN.GAIN_4_096V, Ads1115.ADDRESS.GND, 4);
Ads1115 ads1115 = new Ads1115(pi4j, 0x01, Ads1115.GAIN.GAIN_4_096V, Ads1115.ADDRESS.GND, 4);

// Register event handlers to print a message on value change
ads1115.setConsumerSlowReadChannel0((value) -> System.out.println("The actual value from channel 0 is: " + String.format("%.3f", value) + "voltage."));
Expand Down

0 comments on commit 75c1045

Please sign in to comment.