Replies: 6 comments 1 reply
-
Can you show the code or block example you've tried? Are the other buttons working? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
For example, I want to turn on the light with up control and turn off the light with down control, but there is only one button option, so the button that can realize the four functions of up, down, left and right can only realize one function.
… 2024年3月11日 23:18,laurensvalk ***@***.***> 写道:
Can you show the code or block example you've tried? Are the other buttons working?
—
Reply to this email directly, view it on GitHub <#1537 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BG3W6QNZCU5XUP3ZMO4HOVLYXXDN5AVCNFSM6AAAAABEQQKUDCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONBXGUZTM>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
The direction pad gives a number for the direction. So not just a true/false value as with normal buttons. So you can check |
Beta Was this translation helpful? Give feedback.
-
Thank you! How do you do that if you use code blocks? Can you give me a picture of the code block? Thank you!
… 2024年3月12日 16:32,laurensvalk ***@***.***> 写道:
The direction pad gives a number for the direction. So not just a true/false value as with normal buttons.
image.png (view on web) <https://github.com/pybricks/support/assets/12326241/0a294e52-f01a-41d1-bd90-7f981a18a58c>
So you can check == 1 for up, == 2 for up right, and so on.
—
Reply to this email directly, view it on GitHub <#1537 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BG3W6QLQCWKOYI44HSL65H3YX24QBAVCNFSM6AAAAABEQQKUDCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONJWGI4DK>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Thank you! One more question to ask:
How to use block code and xbox controller to achieve LEGO 42114 and 42131 gear shift operation? Can you give me a picture tutorial? Thank you!
… 2024年3月12日 17:30,laurensvalk ***@***.***> 写道:
Sure! Here is an example that will change the hub light to blue for up, green for up/right, red for right, and violet for everything else.
You can add more cases or actions as you like:
image.png (view on web) <https://github.com/pybricks/support/assets/12326241/16a6d4b8-01a5-408a-bec1-0a4cf6141f2f>
—
Reply to this email directly, view it on GitHub <#1537 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BG3W6QNWPPM7FQSXOONNTWLYX3DKPAVCNFSM6AAAAABEQQKUDCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DONJWHE2TI>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
It is not possible to set it up, down, left, and right
Beta Was this translation helpful? Give feedback.
All reactions