Tcm0 Posted November 24, 2019 Posted November 24, 2019 Hello, I watched an interview about Lego Powered Up and at about 6 minutes in, a lego employee teases that the Boost color sensor has a hidden mode to remote control old power functions IR receivers. Did anyone do any research about it/ try it? Quote
Toastie Posted November 25, 2019 Posted November 25, 2019 Well, the party of three looks like they are pretty much on ... whatever. What they said means that the boost color sensor has a light emitting device which is controllable - sounds sort of reasonable. Provided the sensor emits IR for color detection - as this is what the PF receivers recognize. Hmm. Best Thorsten Quote
AMS Michal Posted November 26, 2019 Posted November 26, 2019 (edited) This may be not so well hidden as the boost color sensor reports an output mode called "IR Tx" with the following specs: 90842b0e7cad Port 01, mode 7, name IR Tx 90842b0e7cad Port 01, mode 7, RAW min 0, max 65535 90842b0e7cad Port 01, mode 7, PCT min 0, max 100 90842b0e7cad Port 01, mode 7, SI min 0, max 65535 90842b0e7cad Port 01, mode 7, SI symbol N/A 90842b0e7cad Port 01, mode 7, Value 1 x 16bit, Decimal format 5.0 The value is 16bit which is exactly the PF IR code size. I will try it out once I have some spare time. Edited November 26, 2019 by AMS Michal Quote
AMS Michal Posted November 26, 2019 Posted November 26, 2019 I did manage to make it work. The details are not yet clear though as it seems that the hub is calculating the checksum bits itself, and the port value only needs to include the other 12 bits. Quote
Tcm0 Posted November 28, 2019 Author Posted November 28, 2019 Anyways nice to know. I'm sure that this might be useful for some projects. Too bad that no one knows about it (and there is no official/ easy to use way to make use of it). Quote
Tcm0 Posted April 23, 2020 Author Posted April 23, 2020 Yes, the official Powered Up app now supports it. However, it's a bit complicated. The Power Functions protocol supports different modes: some have speed control (0-7), some have a timeout (they stop if they loose connection to the sender) and some control one or both power functions ports at the same time. You can try to find a fitting mode in the Power Functions RC protocol: https://www.philohome.com/pf/LEGO_Power_Functions_RC_v120.pdf After you found one, you have to find the right values. There is a binary representation of each mode, that helps. You need to find 3 hex values (0 to F) for the "Power Functions Send" block in the powered up app. Each of these is one nibble (4 bit that can either be 0 or 1) from the binary representation of the mode you want to use. You can ignore start, LRC and stop. The first nibble is always the channel. Toogle is always 0 (except if stated otherwise for the mode). The second nibble represents the mode. There is an address bit that's always 0 (except if stated otherwise. But the document states that the receivers don't support the address bit so it's the easiest to just select 0). The third nibble (and often part of the second nibble) controls the actual motors. How - that depends on the mode. You have to read and understand the stuff under the binary representation to use it. Now you've got binary values for each nibble you want to use, so 12 in total. Google "binary to hex converter" and enter them. You will get 3 values from 0 to F. You have to use 2 blocks to control Power Functions with the sensor. One block to set the sensor into the right mode (it has to be used at the beginning of the program or after you changed the mode to something else) and one block that transmits the signal. The first block is always sensor port and 7. 7 stands for the power functions mode. The second block is always sensor port and then your power functions nibbles as hex values. The first is 0 to 3 depending on the power functions channel etc. You can also use variable inputs but that requires a bit of maths magic because the app isn't really made for such a low level. However here is an example program that uses a bit of math magic to control a power functions vehicle with the powered up remote (you still have to have a phone, a powered up hub and the sensor): The second image shows the content of the "my block" (the block with the arrow) in the first picture. It translates the remote inputs (-1, 0, 1) to the power functions values (2, 0, 1). Please do not press either red stop button on the remote. That will destroy the math behind the program ;) Can you tell which mode this program uses? Quote
hank_technique Posted May 20, 2020 Posted May 20, 2020 I had a bit of a crack on my own and came up with similar results from the PF_IR protocol there are 8 Modes only 4 are for driving motors COMBO_DIRECT (MODE 1) SINGLE_OUTPUT(MODES 4 AND 5) AND COMBO_PWM On the SEND_IR_MESSAGE block there are 4 slots SLOT_1 is the port the boost sensor is attached (A -D) PF_IR_TX address is selected in SLOT_2 (0 - 3 equiv 1 - 4 on PF_IR) except in COMBO_PWM mode MODES 1-7 are selected in SLOT_3 INPUT 0 - F in SLOT_4 COMBO_PWM and PF_IR_TX address is selected in SLOT_2 (4 - 7 equiv 1-4 on PF_IR) INPUT_B (BLUE) 0 - F SLOT_3 INPUT_A (RED) 0 - F SLOT_4 Quote
hank_technique Posted May 20, 2020 Posted May 20, 2020 On 4/24/2020 at 5:18 AM, Tcm0 said: Can you tell which mode this program uses? COMBO_DIRECT Mode 1 Quote
Tcm0 Posted May 21, 2020 Author Posted May 21, 2020 On 5/20/2020 at 11:32 AM, hank_technique said: COMBO_DIRECT Mode 1 Yep :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.