JopieK

Powered Up - A tear down...

Recommended Posts

Yes. According to the Lego Wireless Protocol description the hub can report its battery type (normal/rechargable) to the client.

Share this post


Link to post
Share on other sites
On 8/19/2019 at 1:15 PM, GianCann said:

 

Exploring the LEGO App APK file, i've found several firmware file

I looked for text contained in the firmware files (they are not compressed or encrypted), and found one thing mildly interesting. There seems to be a table of port modes for 'analog' devices. The position in the table seem to coincide with device ids for known analog components given in the LWP public documentation:

0x0001     Motor
0x0002     System Train Motor
0x0005     Button
0x0008     LED Light

It is not certain if the devices which do not exist yet can be recognized by the firmware, but it may be worth checking if different resistances on the id lines would trick the firmware to report these devices.

   name     value format     raw min/max     pct min/max    unit min/max    unit? mapping?
 0              01000400    0.00 1023.00    0.00  100.00    0.00    1.00 00000000 00000000
 1 LPF2-MMOTOR  01000400 -100.00  100.00 -100.00  100.00 -100.00  100.00 00000000 00001000 (Motor)
 2 LPF2-TRAIN   01000400 -100.00  100.00 -100.00  100.00 -100.00  100.00 00000000 00001800 (System Train Motor)
 3 LPF2-TURN    01000400 -100.00  100.00 -100.00  100.00 -100.00  100.00 00000000 00001000
 4 LPF2-POWER   01000400 -100.00  100.00 -100.00  100.00 -100.00  100.00 00000000 00001800
 5 LPF2-TOUCH   01000100    0.00    1.00    0.00  100.00    0.00    1.00 00000000 00100000 (Button)
 6 LPF2-LMOTOR  01000400 -100.00  100.00 -100.00  100.00 -100.00  100.00 00000000 00001000
 7 LPF2-XMOTOR  01000400 -100.00  100.00 -100.00  100.00 -100.00  100.00 00000000 00001000
 8 LPF2-LIGHT   01000100    0.00    1.00    0.00  100.00    0.00    1.00 00000000 00001400 (LED Light)
 9 LPF2-LIGHT1  01000100 -100.00  100.00 -100.00  100.00    0.00    2.00 00000000 00001400
10 LPF2-LIGHT2  01000100    0.00    1.00    0.00  100.00    0.00    1.00 00000000 00001400
11 LPF2-TPOINT  01000100    0.00    1.00    0.00  100.00    0.00    1.00 00000000 00001000
12 LPF2-EXPLOD  01000100    0.00    1.00    0.00  100.00    0.00    1.00 00000000 00001000
13 LPF2-3.PART  01000400 -100.00  100.00 -100.00  100.00 -100.00  100.00 00000000 00001000
14 LPF2-UART    01000400    0.00 1023.00    0.00  100.00    0.00    1.00 00000000 00000000

Based on the values I am guessing that all those devices except for the binary button are output only.

 

Share this post


Link to post
Share on other sites

Hi!

On 9/9/2019 at 6:04 PM, Philo said:

A "Powered Up" update of my website...

 
VCC Power for device electronics. Battery voltage for Powered Up, 5V for WeDo 2
   

Are you sure about this VCC levels? I don't see any voltage regulator on standard BOOST motor PCB nor Boost Sensor so VCC should be less then 5.5V for STM8S103F2 / STM8S1054K uC. But, if I am not mistaken, battery voltage in Powered Up is up to 9V.

This voltage should be 2.95V to 5.5V ... so 5V or 3.3V as treczoks said is OK ...

On 1/6/2019 at 12:30 PM, treczoks said:

"4 VCC (9V)" (which is wrongly labeled in this picture, it's actually 3.3V!)

28765311538_e74bf2117a_m.jpg

Share this post


Link to post
Share on other sites
43 minutes ago, bercik said:

Are you sure about this VCC levels? I don't see any voltage regulator on standard BOOST motor PCB nor Boost Sensor so VCC should be less then 5.5V for STM8S103F2 / STM8S1054K uC. But, if I am not mistaken, battery voltage in Powered Up is up to 9V.

Whoops, thanks for the heads up! A cut&paste error, this value applies to motor PWM signals, but VCC on the Pup connector is indeed 3.3V. Corrected! http://www.philohome.com/wedo2reverse/connect.htm

 

Share this post


Link to post
Share on other sites

Hi all,

can anybody give me the command(s) to receive the values of the boost motor  tacho?

Thanks in advance!

Share this post


Link to post
Share on other sites

News reported from my LUG Ambassador (source: LAN forum):

Ready for an early Christmas present? We are super exited to reach this milestone in our digital system in play, with LEGO Powered Up 3.0. With this update we hope to further empower your creativity and enable all of you to rebuild the world. Also, we have a fresh new look!

What’s new?

- For those of you that have more than one hub, good news, you are now able to connect, address, code, and control multiple hubs (up to four actually).

- The app now fully supports the new LEGO TECHNIC hardware. You are now able to connect the new LEGO TECHNIC hub, and use the internal tilt sensor, as well as the new LEGO TECHNIC motors. For the real techy ones, the app can read values from internal sensors (orientation (X, Y, Z), and acceleration (X, Y, Z) of the TECHNIC Medium Hub (Hub128). From the app you can pair motors on port AB, and CD. The app also supports the TECHNIC Large Linear Motor (Motor no. 2) and TECHNIC XL Linear Motor (Motor no. 3). From the app you can regulate power, speed and position of motors.

- Last but not least, the app has gotten a makeover! We’ve given the interior of the two lobbies a thorough clean-up and made it easier for you to create new projects. We’ve also cleaned up the canvas a bit, and don’t worry, all of your canvas features are still available in the little menu in the bottom right corner.

Feedback wanted

This is just the beginning. With this update comes a promise and commitment to keep improving and listening to your feedback. If it’s not too much to ask, please help us become even better by sharing your ideas for improvements, and your awesome creations with the LEGO Powered Up app.

******
My note: at this moment, no update available in Italy, for LEGO Powered Up App. Last update is 2.4.0, October 10th.

Edit: last version is 2.4.0, not 3.7

Edited by GianCann

Share this post


Link to post
Share on other sites

I made a quick google search and the google playstore's review process takes approximatly 3 days.

Share this post


Link to post
Share on other sites

1.)  conneting multiple Hubs works fine....

2.) connecting to technic Hub works fine...

3.) Train Motor on Technic Hub Port A is running...

But: how to select a specicific Hub in a programm ? The green motorsymbol shows only port letters (as usual)

 

 

Edited by Lok24

Share this post


Link to post
Share on other sites
Just now, Lok24 said:

But: how to select a specicific Hub in a programm ?

Took me a while to find... go to the white tab, first is an "expander" block to add under motor selection.

Share this post


Link to post
Share on other sites

Hi all,

there are amazing new functions in the math block, especially under "adv"anced

But what is the idea of the plug when using the HUB connector?
This should be battery level, but us displayed as -1?

And : the are no string varibales (yet)? Arrays? A text field to comment something?

 

Edited by Lok24

Share this post


Link to post
Share on other sites
3 hours ago, Lok24 said:

Hi all,

there are amazing new functions in the math block, especially under "adv"anced

But what is the idea of the plug when using the HUB connector?
This should be battery level, but us displayed as -1?

And : the are no string varibales (yet)? Arrays? A text field to comment something?

 

What do you mean by HUB connector?

There is no way to display text with the powered up app, so why would you need text variables?

Share this post


Link to post
Share on other sites
Just now, Tcm0 said:

What do you mean by HUB connector?

The block to choose the desired hub. Math and logic (white tab), the first block

 

Share this post


Link to post
Share on other sites
1 hour ago, Lok24 said:

The block to choose the desired hub. Math and logic (white tab), the first block

 

Do you mean that showing the battery state doesn't work if you have multiple hubs? Or do you mean the default output of it if it's not connected?

It's return value is the "hub flag" - a number that encodes the hub number (1-4) and the selected port (A-D). Idk why it shows -1 for you, but it shows 02|A for me.

Share this post


Link to post
Share on other sites

Yes , that's waht it shows when you enter 02|A , but if you replace A with the plug it shows -1, I found out that means "hub is not available."

Otherwise it shows 0 ? But there must be values in percent?

Share this post


Link to post
Share on other sites
2 hours ago, Lok24 said:

Yes , that's waht it shows when you enter 02|A , but if you replace A with the plug it shows -1, I found out that means "hub is not available."

Otherwise it shows 0 ? But there must be values in percent?

Which values in per cent? You can't use the battery state in a program as far as I know. I get "01| [Plug Symbol]" if I select the plug.

This block returns the flag of the used hub, no actual sensor value or something. You can imagine it as follows:

(binary values) AABBBBBB

AA represents the selected hub. 00 means hub 0, 01 hub 1, 10 hub 2 and 11 hub 3
BBBB represent the port. Each value represents one port.

This is what the block returns, nothing more. It tells the other blocks which flag (Port/ Hub) to communicate with.

The plug flag is for sensors that use the sensors included in the hub (aka the gyro sensors in the control+ hub).

Share this post


Link to post
Share on other sites
12 hours ago, Tcm0 said:

Which values in per cent? You can't use the battery state in a program as far as I know. I get "01| [Plug Symbol]" if I select the plug.This block returns the flag of the used hub, no actual sensor value or something.

Sure? Have a look, in the upper line you see the blocks with "plug" as input:

PUP-batt.jpg

You can use the symbol to change lights on hub. Threfore you need a value.

But the value is -1, why?

Edited by Lok24

Share this post


Link to post
Share on other sites
6 minutes ago, Lok24 said:

Sure? Have a look, in the upper line you see the blocks with "plug" as input:

PUP-batt.jpg

You can use the symbol to change lights on hub. Threfore you need a value.

But the value is -1, why?

I think the value is -1 (error) because the block can't be used in this configuration. You can't add a number to a [hub port] datatype. The -1 is the result of the maths block, not the actual value of the hub select block.

Edited by Tcm0

Share this post


Link to post
Share on other sites
2 minutes ago, Tcm0 said:

I think the value is -1 (error) because the block can't be used in this configuration. You can't add a number to a [hub port] datatype.

Of course you can add numbers to hub numbers.  Otherwise my programs woulnd't work, as the numbers start with 0.

And as you see there are three values for %-values to change color.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.