Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.
This repository was archived by the owner on May 7, 2025. It is now read-only.

Joystick don't send 2nd value from blynk app #44

Open

Description

@AvEgA-ChuDoTvoreC

Hello, developers!
This is an awesome module for Python and I want to explore it more. But I face an issue while working with it.
Have some kinda vehicle that doesn't receive the 2nd parameter (I spin the joystick in different positions, below is an example of output) and I don't get why I can't read it from value[1] - is always a zero...

Code:

    @blynk.handle_event('write V2')
    def write_virtual_pin_handler(pin, value):
        Controller(pin="V2", x_coord=value[0], y_coord=value[1])
        print("Write: ", WRITE_EVENT_PRINT_MSG.format(pin, value))

Output:

     Write:  [WRITE_VIRTUAL_PIN_EVENT] Pin: V2 Value: '['52', '0']'

2021-03-14 03 15 20

Activity

  1. changed the title [-]Joystick don't send 2nd value from blank app[/-] [+]Joystick don't send 2nd value from blynk app[/+] on Mar 14, 2021
  2. antohaUa commented on Mar 16, 2021

    @antohaUa
    Collaborator

    Hi ChuDoTvoreC!
    There is really some mess with continuous values ( I will try to ping Blynk App developers - this is real BUG )
    In my case I had sometimes even negative values

    2021-03-17 00:15:55,414 [INFO]  Event: ['write v2'] -> (2, ['9999', '0'])
    2021-03-17 00:15:55,603 [INFO]  Event: ['write v2'] -> (2, ['9999', '-1015.52344'])
    2021-03-17 00:15:55,614 [INFO]  Event: ['write v2'] -> (2, ['9999', '-1581.873'])
    

    But all OK with integer values ( In my case it was Android 2.27.27 App) - you can simply increase MAX value ( to have larger range of values) for example to 1024 and you will get smth like

    2021-03-17 00:15:31,093 [INFO]  Event: ['write v2'] -> (2, ['0', '578'])
    2021-03-17 00:15:32,054 [INFO]  Event: ['write v2'] -> (2, ['68', '578'])
    

    Firsrt and Second values will be correct.

    P.S Continuous values as you know can be disabled by disabling wave icon between MIN and MAX values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions