rename conexion2

parent 35714521
...@@ -91,7 +91,7 @@ class Conexion: ...@@ -91,7 +91,7 @@ class Conexion:
# Función para enviar mensajes MQTT al broker # Función para enviar mensajes MQTT al broker
def send_mqtt_message( topic,message): def send_mqtt_message( topic,message):
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2) client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
client.connect("192.168.48.245" , 1883) client.connect("192.168.0.134" , 1883)
client.publish(topic, message) client.publish(topic, message)
client.disconnect() client.disconnect()
......
{ {
"ipbroker" :"192.168.48.245", "ipbroker" :"192.168.0.134",
"portbroker" : "1883", "portbroker" : "1883",
"topicSubsRobot" : ["A3-467/GrupoL/Robot","A3-467/GrupoL/SincRobot"], "topicSubsRobot" : ["A3-467/GrupoL/Robot","A3-467/GrupoL/SincRobot"],
"topicSubsInterfaz" : ["A3-467/GrupoL/Interfaz","map","A3-467/GrupoL/SincInterfaz"], "topicSubsInterfaz" : ["A3-467/GrupoL/Interfaz","map","A3-467/GrupoL/SincInterfaz"],
......
import tkinter as tk import tkinter as tk
from tkinter import ttk from tkinter import ttk
from PIL import Image, ImageTk from PIL import Image, ImageTk
import conexion as cn import conexion2 as cn
import time import time
import pedidos as pd import pedidos as pd
import mensajeInterfaz as mi import mensajeInterfaz as mi
......
import conexion as cn import conexion2 as cn
import time import time
mapa = "0202000105030705000200041109060110031000000200080101100110000106010701" mapa = "0202000105030705000200041109060110031000000200080101100110000106010701"
...@@ -8,7 +8,7 @@ while(True): ...@@ -8,7 +8,7 @@ while(True):
cn.send_mqtt_message("map",mapa) cn.send_mqtt_message("map",mapa)
print("Enviado") print("Enviado")
time.sleep(10) time.sleep(20)
""" """
topic = "A3-467/GrupoL/Interfaz" topic = "A3-467/GrupoL/Interfaz"
......
#from typing import Any #from typing import Any
import conexion as cn import conexion2 as cn
import time import time
import json import json
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment