/// <summary>
        /// Change the sensor's spread factor to 7, BW 125 kHz
        /// </summary>
        private static async Task SetSpreadFactor(string sensorId)
        {
            Console.WriteLine("Test /api/sensor/set-tx-spreading-factor");
            Console.WriteLine("Set Tx Spread Factor to SF 7, BW 125 kHz (y/n)?");
            string input = Console.ReadLine();

            if (input == "y" || input == "Y")
            {
                try {
                    // Sample JSON to send. Payload is an int (see API documentation)
                    JObject json = new JObject {
                        ["sensorId"] = sensorId,
                        ["payload"]  = 6
                    };

                    Console.WriteLine("Sending set Tx spreading factor...");

                    await SensorApi.SetTxSpreadingFactor(json.ToString());

                    Console.WriteLine("Set Tx spreading factor sent" + "\n");
                } catch (Exception ex) {
                    Console.WriteLine("Method Error: " + ex.Message + "\n");
                }
            }
        }