A) TempSensor Class
H κλάση αναπτύχθηκε από τον φοιτητή Σωκράτη Ζούρα. H κλάση σας δίνεται με την μορφή αρχείου jar (tsensor.jar)
package apt.lab.rpi.tempsensor
class TempSensor implements AutoCloseable
Class API
TempSensor()
Note that the application needs to be running as root or this will fail.
void close()
Call when done with the temperature sensor unless you use TempSensor with try-with-resources block.
float getKelvin()
Get current temperature in Kelvin.
float getCelcius()
Get current temperature in Celcius.
float getFahrenheit()
Get current temperature in Fahrenheit.
B) GPIO Class
H κλάση αναπτύχθηκε από τον φοιτητή Σωκράτη Ζούρα. H κλάση σας δίνεται με την μορφή αρχείου jar (gpio.jar)
package apt.lab.rpi.gpio
class GPIO implements AutoCloseable
public enum GPIO.PIN { GPIO_03, GPIO_05, GPIO_07, GPIO_08, GPIO_10, GPIO_11, GPIO_12, GPIO_13, GPIO_15, GPIO_16, GPIO_18, GPIO_22, GPIO_29, GPIO_31, GPIO_32, GPIO_33, GPIO_35, GPIO_36, GPIO_37, GPIO_38, GPIO_40};Class API
GPIO(PIN pin)
void close()
Call when done with the temperature sensor PCB unless you use GPIO with try-with-resources block.
void turn_on()
Turns on (+3.3V) the GPIO pin.
void turn_off()
Turns off (0.0V) the GPIO pin.