gpio_connect module

This program consist of the functions which are used in main.py file for operating the GPIO pins and ending the transaction when the operator presses the button on JuiceBox

class gpio_connect.ConnectgpioPins

Bases: juicebox.Juicebox

This class is the subclass of Juicebox which contain the GPIO pins utility and ending transaction functionality

Attributes
rid_1: str
RFID number of the operator
rid_2: str
RFID number of the staff member
temp_rid: str
temporary variable for storing the RFID number
role_1: int
assigned the default value of role_1 as 0
role_2: int
assigned the default value of role_2 as 0
trans_id: str
transaction id used for ending the transaction
go: bool
assigned the default value as False
end_trans()

This function is used to end the transaction when the operator hits the JuiceBox button. It ends the ticket that was initiated on the FabApp Dashboard

Returns:
str: It prints the success message with ticket number that has been closed
heart_beat()

This function is used to show output on the JuiceBox device by blinking the LED ligths. After the operator scans their tokens it is validated and if the information is correct it blinks once and solid red light is displayed. If the information is not correct it blinks multiple times and shuts down.

refresh()

This function is used to refresh the JuiceBox for the next time use