Jul-04-2022, 01:31 PM
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:
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:
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-17BTW 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