Python Forum
How to use an Emulator and a MttQ broker?
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use an Emulator and a MttQ broker?
#13
Good Morning,

I used the wrong choice of words. I wanted to know if EntOff() has been called, if it has been (button pressed) called print timestamp in the historic window. I was doing side tests for mongo to see if it would show up in the histo log, but i never posted the code. Sorry.

The project has you guessed send info as a timestamp to a log(histo). There is 3 parts, the GPIO RPiSim i have not been able to make it work yet. The second is the MttQ server, you send the time stamp from the program and get the info out from a terminal. Thats fine. The third is to send the timestamp log to mangodb and than you retrieve the timestamp log from mango server and make it appear in the histo log. That third part i cant test on my rasbian because every time i run the code i get this:

Error:
Traceback (most recent call last): - File "/home/pi/Desktop/Projet_1.py", line 9, in <module> import pymongo ModuleNotFoundError: No module named 'pymongo'
But pymongo is installed. That part is commented in the code. Line 38-39-14-15-17

BTW what is the use of show in your code, it is returning 'Histo' object has no attribute 'show'.

I got an exam on classes in august i really need to find a good tutorial about this to learn more. Its not my strong suite.

For GPIO i tried many times to make it work but cant figure out all those errors:

Error:
Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.7/tkinter/__init__.py", line 1705, in __call__ return self.func(*args) File "/home/pi/Desktop/Projet_1.py", line 91, in EntOff GPIO.output(Ent, GPIO.LOW) RuntimeError: Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) Pin 22 - Low
Thank you
Reply


Messages In This Thread
RE: How to use an Emulator and a MttQ broker? - by Frankduc - Jul-04-2022, 01:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pyautogui with a display emulator? gumby4231 0 2,633 Jul-30-2020, 02:46 PM
Last Post: gumby4231
  running python script from shell invoked with os.system("x-terminal-emulator -e /bin/ markhaus 2 3,121 Feb-21-2019, 11:55 PM
Last Post: markhaus

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020