MMRIZE / MMM-GroveGestures

MagicMirror Module - detecting 3D gesture with GroveGesture Sensor(PAJ7620u2)
MIT License
38 stars 11 forks source link

Keyboard Interrupted ??? #5

Closed ezar closed 5 years ago

ezar commented 5 years ago

Hi eouia,

Everytime appears this error, and I cannt use it :( Why?

1|MagicMir | Keyboard Interrupted 1|MagicMir | [GESTURE] Gesture script is finished.

ezar commented 5 years ago

Can you restart pyshell when onError?

eouia commented 5 years ago

When this interrupt is appeared? This error would be happened when you try to kill the script by manual. Describe me more details what you tried, and what you expected as a result of your trial, but how it failed.

ezar commented 5 years ago

Appears after start MagicMirror. I didn't nothing with the script. When it appear, I need to restart MagicMirror because Gesture doesn't works :(

eouia commented 5 years ago

It might mean your python script has an error from start with your seeting. Check it works or not

eouia commented 5 years ago

https://github.com/eouia/MMM-GroveGestures/blob/master/README.md#installation-of-module

Did you all the steps by instructions above link? There be also an instruction how to check your script

ezar commented 5 years ago

Yes! The script works sometimes. Other times gets timeout, others error :(

ezar commented 5 years ago

Paj7620 initialize register finished. Traceback (most recent call last): File "gesture_print.py", line 43, in g.print_gesture() File "/home/pi/MagicMirror/modules/MMM-GroveGestures/py/grove_gesture_sensor.py", line 440, in print_gesture data1=self.paj7620ReadReg(0x44, 1)[0] File "/home/pi/MagicMirror/modules/MMM-GroveGestures/py/grove_gesture_sensor.py", line 372, in paj7620ReadReg return bus.read_i2c_block_data(self.PAJ7620_ID, addr,qty) IOError: [Errno 121] Remote I/O error

Can we try this? (https://github.com/fivdi/i2c-bus/blob/master/doc/raspberry-pi-software-i2c.md)

bolish commented 5 years ago

Hi, I also get error. (sometimes MMM-GroveGestures stops working or even don't start working). How do you get the error log for analysis purpose? I would like to share my issue also.

ezar commented 5 years ago

I activate using config.

verbose:true

ezar commented 5 years ago

Seems that we have a more recent version

https://github.com/Seeed-Studio/grove.py/blob/master/grove/grove_gesture_sensor.py

I try it replacing to from smbus2 import SMBus

Same problem :(

Please reinit when py error :)

Do you use a RPI for test?

eouia commented 5 years ago

Of course, I tested it with RPI(RPI 3 B+)I also. Hmmmm.... I'll try recent version script in a few days. (I'm on vacation now, sorry)

eouia commented 5 years ago

Ok. I've tested my module again with newly formatted RPI from H/W installation. Environment :

My module(and py scripts) is working as expectation.

I doubt you've missed or failed something on H/W installation. Could you check again? Especially, sudo i2cdetect -y 1 should show you 73 on the matrix of result.

eouia commented 5 years ago

If sometime work or not, It seems your GPIO(I2C) connection is not so stable. Maybe it could be H/W problem or Electricity issue.

ezar commented 5 years ago

I'm using a I2C temperature sensor without problem :(

eouia commented 5 years ago

Sorry, but I cannot find any suspicious point at this moment. Does 'i2cdetect -y 1' show proper address of sensor?(73)? Usually IOError: [Errno 121] Remote I/O error itself occurs when a not available address is referenced. And usually it come from not installed or connected H/W. (Of course there could be other reasons... however,)

ezar commented 5 years ago

Seem solved ;) I reduce i2c speed to 10000. Regards

eouia commented 5 years ago

Nice to hear it. I haven’t thought about it. I’ll close this issue.

jonathanbonette commented 7 months ago

Seem solved ;) I reduce i2c speed to 10000. Regards

works for me as well, for anyone interest:

in terminal: sudo nano /boot/firmware/config.txt if you dont have this line in your config.txt, add it right below to the others dtparam configs dtparam=i2c_arm_baudrate=10000 ctrl + x to exit, y to confirm, and enter to save it reboot your rasp sudo reboot after the reboot, just check the file to see if it is saved correctly