Git Product home page Git Product logo

Comments (14)

jabrooke avatar jabrooke commented on August 31, 2024

I'm having a very similar issue with the Stardust -- same behavior with the initial boot sequence with default test sound, and similar behavior with buttons (two-button starts in config mode, one button starts in action mode). I also have an issue where I get the poweron.wav sound when I apply power, but no sound when I get the blade to light.

from fx-saberos.

Protonerd avatar Protonerd commented on August 31, 2024

Hi guys, are you sure you tell the code to use a Stardust instead of a Prime? You can do it in the Config_HW.h file

//#define DIYINO_PRIME
#define DIYINO_STARDUST

The topic is, on the Prime the D11 is a PWM pin and the D4 is the aux pin signal. If you wire up D11 as a button but use the Prime branch, it will force D11 to 0V (switching off LEDs) and this in turn will be interpreted as a long press on the aux pin, getting the saber to Config Mode right away.

To be honest all my 2-button sabers have a Prime, so I cannot try 2-buttons with a Stardust, but the only difference is the D11 pin (LED driver for Prime and aux pin for Stardust).

One-button mode should work fine, the problem you see there comes from not being able to make a proper double click. It needs some excercise. Actually one of the thing I will work on next year will be to eliminate the double click as much as possible.

from fx-saberos.

NobAkimoto avatar NobAkimoto commented on August 31, 2024

Hey Andras.

I definitely have it on the Stardust branch - so I'm trying to figure out why it's doing the behavior it's stuck on.

Do you know why it might be acting strangely on Version 1.1, but doing okay on the current version?

from fx-saberos.

NobAkimoto avatar NobAkimoto commented on August 31, 2024

Also is there a parameter for adjusting the period required for a double click to register?

from fx-saberos.

jabrooke avatar jabrooke commented on August 31, 2024

I confirm that I also have it set as stardust. I’ll start again in the morning and review the code to see if a prime vs stardust check is not working as expected.

from fx-saberos.

NobAkimoto avatar NobAkimoto commented on August 31, 2024

I can confirm that one button mode works fine - the double-clicks DO have to be really really fast, but it seems part of the problem was that sleep mode's right after soundfonts, so if you're too slow it puts the board to sleep right after.

from fx-saberos.

Protonerd avatar Protonerd commented on August 31, 2024

The parameters governing the button sensitivity required by the OneButton library are located in the Config_SW.h file:
/*

  • BUTTONS PARAMETERS
    /
    #define CLICK 200 //5 // ms you need to press a button to be a click
    #define PRESS_ACTION 600 //200 // ms you need to press a button to be a long press, in action mode
    #define PRESS_CONFIG 600 //400 // ms you need to press a button to be a long press, in config mode
    /
    /
    Try playing around with the CLICK parameter to adjust the sensitivity of the double clicks.

Also there is an undocumented feature I dubbed hit-and-run or escape sequence, a hit (clash) detected in Config Mode will have you exit config mode (well, mostly, in volume mode it will set the volume to max).

As to why the 2-buttons mode will start in Config: I'm pretty sure it's because somewhere in the code the D11 is forced to 0V. I just need to find out where. Reason is that D11 is a PWM pin and on the Prime it controls a MOSFET gate.

I also do not really know why the 1.1 behaves differently to the master branch. Of course I alwways improve the code but I do not really remember changing anything other than support for the Pixies and implementing the sleep mode timer.

Can say more if I will have the time to look at the code myself.

from fx-saberos.

Argathena avatar Argathena commented on August 31, 2024

I do not feel it's a wiring issue. I have both prime and stardust, and i could never get the two button to work on the stardust. I just put one button on my saber and called it good. I never mentioned it because I just settled for one button. I checked the manual a million times trying to wire 2 button on. It was definitely wired correctly. Anyways thought I'd share that similarity with you.

from fx-saberos.

Protonerd avatar Protonerd commented on August 31, 2024

Bug found, fix is in work.

Quick fix for those who cannot wait ;o)
comment out all lines which start with:
digitalWrite(11

from fx-saberos.

Protonerd avatar Protonerd commented on August 31, 2024

There are 2 such lines in Light.cpp

from fx-saberos.

jabrooke avatar jabrooke commented on August 31, 2024

Thank you for finding it so quickly! I haven’t even had enough coffee to open the code up yet.

from fx-saberos.

Protonerd avatar Protonerd commented on August 31, 2024

I made a new release, check out the master branch, it works fine on my side.

from fx-saberos.

Protonerd avatar Protonerd commented on August 31, 2024

I guess it works now as I had feedback to deny it :)

from fx-saberos.

NobAkimoto avatar NobAkimoto commented on August 31, 2024

It works great, sorry for the lack of reply.

from fx-saberos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.