mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
rotary_relay: Updated java examples
Changed module from upm_grove to upm_relay/rotary. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
1b9b142b2e
commit
50ec3a018f
@ -26,7 +26,7 @@ public class RelaySample {
|
|||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
// ! [Interesting]
|
// ! [Interesting]
|
||||||
// Create the button object using UART
|
// Create the button object using UART
|
||||||
upm_grove.Relay relay = new upm_grove.Relay(5);
|
upm_relay.Relay relay = new upm_relay.Relay(5);
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
relay.on();
|
relay.on();
|
||||||
@ -41,4 +41,4 @@ public class RelaySample {
|
|||||||
}
|
}
|
||||||
// ! [Interesting]
|
// ! [Interesting]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public class RotarySample {
|
|||||||
|
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
// ! [Interesting]
|
// ! [Interesting]
|
||||||
upm_grove.Rotary knob = new upm_grove.Rotary(0);
|
upm_rotary.Rotary knob = new upm_rotary.Rotary(0);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
float abs_value = knob.abs_value(); // Absolute raw value
|
float abs_value = knob.abs_value(); // Absolute raw value
|
||||||
@ -46,4 +46,4 @@ public class RotarySample {
|
|||||||
// ! [Interesting]
|
// ! [Interesting]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user