Protonerd / FX-SaberOS

System code for Arduino based Lightsaber replicas for DIYino family boards
Creative Commons Zero v1.0 Universal
91 stars 42 forks source link

Clash detection doesn't work #74

Closed AndongYi closed 4 years ago

AndongYi commented 6 years ago

For some reason any clash detection dissaperared (swing detection is still there) in last version. if I single click a button saber goes into blaster block mode and double click does nothing.

Tried reloading previous version of FXSOS with disabled lockup clash in singlebutton setup and clash detection works fine so i assume both wiring and MPU are fine.

Using arduino nano, df player, MPU6050, 3 strips of neopixel and a single 18650 for power

jbkuma commented 6 years ago

There are two modes for clash detection. If you are configured for interrupt based clashes then the int pin of the mpu must be wired to D2, otherwise use the polling method.

On Fri, May 11, 2018, 1:34 AM AndongYi notifications@github.com wrote:

For some reason any clash detection dissaperared (swing detection is still there) in last version. if I single click a button saber goes into blaster block mode and double click does nothing.

Tried reloading previous version of FXSOS with disabled lockup clash in singlebutton setup and clash detection works fine so i assume both wiring and MPU are fine.

Using arduino nano, df player, MPU6050, 3 strips of neopixel and a single 18650 for power

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/74, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMApGeQEfFplCe2hJRlxY-OkeF1AVks5txSLmgaJpZM4T67XO .

AndongYi commented 6 years ago

Thank you for a fast reply. I'll try to change the mode and see if it helps

jbkuma commented 6 years ago

Neither is especially difficult. You'll see the settings in the config file and just comment as appropriate similar to setting the blade type.

Jason "Kuma" Brinkerhoff Mad Science Workshoppe, proprietor http://jbkuma.com/workshoppe

On Fri, May 11, 2018 at 11:53 AM, AndongYi notifications@github.com wrote:

SInce i'm a total noob in coding is there a simple way to change this menthod in FXSOS or it would be easier to just wire int pit to D2?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Protonerd/FX-SaberOS/issues/74#issuecomment-388405240, or mute the thread https://github.com/notifications/unsubscribe-auth/ATdCMCqItg5kc0YYlRdEPPz46DdJmOBpks5txbPugaJpZM4T67XO .

AndongYi commented 6 years ago

Thanks again, everything works now. A side question, is there any benefits in either mode in terms of precision/speed reaction or it doesn't matter which mode to choose?

Protonerd commented 6 years ago

INT based clash detection is supposed to react instantenously, but in reality you will hardly see any difference, both work spot-on.