Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Vicente Castellano Gómez
/
robotAmbientales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7996b9d4
authored
May 11, 2024
by
Samuel Valverde Garcia
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
rename conexion2
parent
35714521
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
conexion.py → conexion2.py
conexionConfig.json
interfaz.py
main_map.py
mensajeInterfaz.py
conexion.py
→
conexion
2
.py
View file @
7996b9d4
...
...
@@ -91,7 +91,7 @@ class Conexion:
# Función para enviar mensajes MQTT al broker
def
send_mqtt_message
(
topic
,
message
):
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
.
disconnect
()
...
...
conexionConfig.json
View file @
7996b9d4
{
"ipbroker"
:
"192.168.
48.245
"
,
"ipbroker"
:
"192.168.
0.134
"
,
"portbroker"
:
"1883"
,
"topicSubsRobot"
:
[
"A3-467/GrupoL/Robot"
,
"A3-467/GrupoL/SincRobot"
],
"topicSubsInterfaz"
:
[
"A3-467/GrupoL/Interfaz"
,
"map"
,
"A3-467/GrupoL/SincInterfaz"
],
...
...
interfaz.py
View file @
7996b9d4
import
tkinter
as
tk
from
tkinter
import
ttk
from
PIL
import
Image
,
ImageTk
import
conexion
as
cn
import
conexion
2
as
cn
import
time
import
pedidos
as
pd
import
mensajeInterfaz
as
mi
...
...
main_map.py
View file @
7996b9d4
import
conexion
as
cn
import
conexion
2
as
cn
import
time
mapa
=
"0202000105030705000200041109060110031000000200080101100110000106010701"
...
...
@@ -8,7 +8,7 @@ while(True):
cn
.
send_mqtt_message
(
"map"
,
mapa
)
print
(
"Enviado"
)
time
.
sleep
(
1
0
)
time
.
sleep
(
2
0
)
"""
topic = "A3-467/GrupoL/Interfaz"
...
...
mensajeInterfaz.py
View file @
7996b9d4
#from typing import Any
import
conexion
as
cn
import
conexion
2
as
cn
import
time
import
json
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment