import queue
import time
import threading
import bluetooth
import math
import random
import socket
import subprocess # for Raspberry Pi shutdown
import os
class BluetoothServer:
# run = True # Argument for shuting down all loops at the same time with input from one device.
def __init__(self, list_of_variables_for_threads):
# List of all variables from main to class.
self.list_of_variables_for_threads = list_of_variables_for_threads
self.go = list_of_variables_for_threads["go"]
# Bluetooth variables
self.client_list = [] # list for each connected device, sockets
self.address_list = [] # list for mac-adresses from each connected device
# self