Jump to content

Recommended Posts

Posted

I have one more :innocent2: ... I would love to work with:

This is another vintage LEGO device, the LEGO Dimensions toy pad. I know that @Mr Hobbles has realized a fantastic solution for interacting with the pad/let the pad do things, but I am simply too dumb to get that going. Here is one of >his< stunning videos about that:

Wouldn't it be incredible, when putting a tag (figure/minifigure) on one of the sectors on the pad, that Interface A would "react" and does something? These pads would also add some nice lighting to any larger build as well. And if I am not mistaken, even multiple pads could be used ... 

Just an idea ...

All the best
Thorsten

 

Posted (edited)
6 hours ago, AJB2K3 said:

CADA

I had to search for what is CaDA...   If I understand well, it is non lego bricks company...
I had no idea who they are...  For the moment, I have enough only with Lego devices :-)

  

4 hours ago, Toastie said:

This is another vintage LEGO device, the LEGO Dimensions toy pad

Wow, I never heard of this...

And after some search, I see that LEGO Dimensions pad are for Game console like WII, XBOX, PS4 etc...  So they have different protocol (and cable ?) I would guess according to which console you have?

Edited by Bliss
Posted

From what I can see it's advertised as 2.4GHz. remote devices. they have an app so I assume they could be Bluetooth but haven't got the will power to look into it.

Posted

I finally got a Techinc control+ hub with one XL and one L motors.

It seems to work with Lego Blockly out of the box with all the motor blocks.

But technic hub has new internal sensors to handle that I have to take care off...

Stay tune for more...

Posted (edited)
4 hours ago, Bliss said:

I would guess according to which console you have?

Yes. As far as I understood, the XBOX version is one type, which does not work with non-LEGO software (as the protocol is unknown?) whereas the other version (for Wii and all others) does work, as the protocol is known. @Mr Hobbles knows certainly more about that as he can read/write to the Wii type device using node.js.

I have the Wii version of the pad and I had somewhere a control program I found in the webs (which I can't find anymore :pir-murder:) that let me turn on/off the LEDs in the pad and change their colors on a Win10/11 laptop via USB.

They are also rather cheap.

Best
Thorsten

Edited by Toastie
Posted (edited)
5 hours ago, Toastie said:

Yes. As far as I understood, the XBOX version is one type, which does not work with non-LEGO software (as the protocol is unknown?) whereas the other version (for Wii and all others) does work, as the protocol is known. @Mr Hobbles knows certainly more about that as he can read/write to the Wii type device using node.js.

I have the Wii version of the pad and I had somewhere a control program I found in the webs (which I can't find anymore :pir-murder:) that let me turn on/off the LEDs in the pad and change their colors on a Win10/11 laptop via USB.

They are also rather cheap.

Best
Thorsten

Exactly as you said, the Wii/PS3/PS4 Toy Pads are identical, with a pretty basic wire protocol running over USB HID. The Xbox 360/One version is different - the cable has an authentication chip in it that means it will only talk to Xbox consoles. It's pretty useless for any other purpose.

The Toy Pad acts as a basic NFC reader (well, 3 NFC readers actually), allowing arbitrary reads of blocks from an NTAG213/214/215 tag, not just LEGO Dimensions tags. In fact, I've tested it with the pairing cards that came with LEGO Education Science/Computer Science & AI. It can read them just fine. Sadly, it cannot read Smart Play minifigures, as LEGO moved to NFC-V/ISO15693, which the Toy Pad cannot read.

The most annoying part of the protocol is the TEA encryption used for decrypting the data on the LEGO Dimensions tags. This is required to read/write any game specific data to the tags, such as reading which character or vehicle ID was placed onto the Toy Pad. Other than that, nothing else is encrypted, just raw message payloads (ie. changing color, fading effects, reading UID's, etc).

Though, if @Bliss wanted to add it, I'm sure Claude or Codex would make short work of it by pointing it at my Node.js library. :) https://github.com/nathankellenicki/node-toypad

Edited by Mr Hobbles
Posted
31 minutes ago, Mr Hobbles said:

Though, if @Bliss wanted to add it, I'm sure Claude or Codex would make short work of it by pointing it at my Node.js library. :) https://github.com/nathankellenicki/node-toypad

Thank you very much for all this information and link to your work.

I just found out today about the existence of Lego Dimensions...  And I saw some toy pads not too expensive on marketplace around my location.
I will certainly try to add support for this in Lego Blockly.

Thanks also to @Toastie to bring this up...

Posted (edited)

In version: 2026-05-17-2324

I improved the tilt block that works for BOOST and Technic hub internal tilt sensors (Choose port "TILT") (Boost does not have axis Z).

I will add soon the Accel and Gyro and Gesture blocks (Technic Hubs)...  I'm not too sure about the values they give. 
Accelerometer give mG (milli-G) that gives a number that could be used for the tilt but I prefer the Tilt block as it give Degree of tilt... 
Gyro gives DPS (Degree Per Second) so I think it must detect moving or accelerating, not sure yet...

chrome_DL2JvMnv5f.png

14 hours ago, AJB2K3 said:

From what I can see it's advertised as 2.4GHz. remote devices. they have an app so I assume they could be Bluetooth but haven't got the will power to look into it.

From what I can find about it, they use BLE (BLE use 2.4 ghz).  They did not make their protocol public but there might be people that have done some reverse engineering etc...

I'm glad to know there are other alternatives but I will put this in the very bottom of my todo list for the moment.

Edited by Bliss
Posted
1 hour ago, Bliss said:

...

From what I can find about it, they use BLE (BLE use 2.4 ghz).  They did not make their protocol public but there might be people that have done some reverse engineering etc...

...

Hello,

Have a look at Brickcontroller2


Jo

Posted
7 hours ago, Mr Hobbles said:

...

The Toy Pad acts as a basic NFC reader (well, 3 NFC readers actually), allowing arbitrary reads of blocks from an NTAG213/214/215 tag, not just LEGO Dimensions tags. In fact, I've tested it with the pairing cards that came with LEGO Education Science/Computer Science & AI. It can read them just fine. Sadly, it cannot read Smart Play minifigures, as LEGO moved to NFC-V/ISO15693, which the Toy Pad cannot read.

The most annoying part of the protocol is the TEA encryption used for decrypting the data on the LEGO Dimensions tags. This is required to read/write any game specific data to the tags, such as reading which character or vehicle ID was placed onto the Toy Pad. Other than that, nothing else is encrypted, just raw message payloads (ie. changing color, fading effects, reading UID's, etc).

...

Hello,

(Where) Are the readouts of the TAGs available ?

What Value does the TAG-Characters represent ?
At which address in the TAG-Memory is the character-ID stored ?


Jo

Are there more RAW-Data than the 14 of the SmartPlay Tags known ? Bricklink reports 36 (Tiles + Figs)

Posted (edited)
On 5/18/2026 at 6:58 AM, BrickTronic said:

Hello,

(Where) Are the readouts of the TAGs available ?

What Value does the TAG-Characters represent ?
At which address in the TAG-Memory is the character-ID stored ?


Jo

Are there more RAW-Data than the 14 of the SmartPlay Tags known ? Bricklink reports 36 (Tiles + Figs)

Well, code is source of truth of course, so I recommend reading the library first and foremost. But LEGO Dimensions uses tag pages 0x24-0x27. Block 0x26 stores a flag to detect if the tag is a vehicle or a character. If it's a character, then the id stored in a uint32 (first four bytes) of block 0x24 is encrypted with the TEA cipher using a key derived from the UID of the tag (so you'll need to read this first). Once you have the character id, you can look it up in the map: https://github.com/nathankellenicki/node-toypad/blob/master/data/minifigs.json

If it's a vehicle, then the id is not encrypted and can be looked up in the map https://github.com/nathankellenicki/node-toypad/blob/master/data/vehicles.json

There is additional data on the tag for vehicles (written by the game) which stores which in game vehicle upgrades the user has chosen.

Character tags have those blocks write-locked out of the factory. Vehicle tags can be rewritten.

Note that only those blocks are write-locked (or not). A lot of the other blocks are not locked, and not used by the game, meaning you can store arbitrary data in them without affecting their use in game. :D (I my have had some personal creative uses for this lol)

Note: The TEA key being derived from the UID means it's pointless distributing dumps of the tags. They can't be cloned byte for byte onto another tag, as the UID will be different, and therefore decryption will fail ingame. It is however possible to write your own tags as they'll do the TEA encryption. There are Android and iOS apps for LEGO Dimensions that do this.

As for Smart Play, I have some reverse engineering notes here, including some tag data https://github.com/nathankellenicki/node-smartplay/blob/main/research/notes/HARDWARE.md

I haven't bothered to document all tags I have. Also as far as I know noone has managed to decrypt the data on the tags yet - it looks like AES, and the key appears baked into the ASIC on the Smart Brick. But, unlike LEGO Dimensions, the data isn't encrypted using a key derived from the UID, so you can successfully clone the Smart Tags/Minifigs onto blank tags, and they will work.
 

Edited by Mr Hobbles
Posted

In version: Version: 2026-05-20-0052

New WeDo 2.0 hub support:

The following example will change the color of the WeDo2 LED randomly every time you press on the WeDo  green button (short press)

chrome_DwDoUX6BYw.png

Another example for the Distance and Tilt Sensors:

chrome_LBt4PpvlT8.png

It only supports the WeDo 2.0 Sensors and simple motor that came with the set.

There is a piezo inside the WeDo 2.0 hub but I find it almost inaudible (at least for me), so I did not implement it.  I can add it if someone realy want it in blockly...

Posted (edited)

Dear All,

got my hands on these nifty lil' boxes for Arduino Uno/Yun/M0 Pro/Leonardo. They all fit in there, just both faceplates need to be selected:

640x360.jpg

So I put my LEGO Blockly Arduino with homemade "shield" in there, needed 10 more holes, one for the HC-05, which I can plug/unplug as needed. The other is on the back for the 20 ribbon cable to Interface A and there are the 8 holes for the LED's on the top cover. These are positioned/drilled easily with a scrap piece of perfboard, as the LEDs on the shield do as well. The top cover has 4 additional holes, two for the I/O pins, two more for whatever. The top cover surface is recessed so that a 1 or 2 mm thick cover plate nicely fits in there. I simply used what I found in the basement: 2 mm acrylic glass, which gives clean edges when cut with an exacto knife and then bent - snap! - and carefully sanded. Added a coat of black spray paint, first to the underside, looked cool, but the acrylic glass was showing that it spent some time with metal parts in a drawer. Another coat on the exposed side and a couple of superglue spots to make it stick. Next time, I'll use a new acrylic glass piece, as a) it looks cooler when coated on the underside and b) the black paint doesn't come off - well it can't :pir-laugh:.

Here we go: Naked + clothed ... wait - it should be the other way around ... :innocent2:

640x587.jpg

640x360.jpg

Yeah - don't panic ...

All the best
Thorsten

Edited by Toastie
  • 3 weeks later...
Posted (edited)
On 5/23/2026 at 3:24 PM, Toastie said:

So I put my LEGO Blockly Arduino with homemade "shield" in there

Very nice box!

Could you add another LED ?  An IR Emitter LED on Pin D2 ? :-)

In the Int.A V2 toolbox, I added a new PF IR section...

chrome_tP508MuKcu.png

I thought at first to make a driver for PF IR on a separate arduino with a new serial protocol etc...
But since we already have a driver with a custom serial protocol for Interface A, I thought it could be easier to just merge the PF IR protocol code in the Int. A arduino code...

However, it is not that intuitive because someone that just want to play with PF IR in blockly (No Int.A) will have to choose Int.A V2 in the device drop box.  So I changed the text in the dropbox for Int.A V2+PF IR...

Also, this was not that simple to merge with Int.A V2 arduino code because the PF IR arduino code found on the internet is a "Blocking code", and it takes around 100-150 ms to send an IR sequence...  It was affecting Int.A Commands response time...
So Copilot gave me an alternative code using Interrupt timers which is quite complex but it works great...

 

There are two new blocks really.

The PF Single Output block: This block will start or stop one motor (RED port or BLUE port).  There is no timeout.
chrome_u6ZrWazEkF.png

and the PF Combo PWM block: This block will start or stop TWO motors at the same time at the specified power.  This combo command has internal timeout (about 1.4 sec I think)
So to keep the command executing, you must repeat it somehow.
chrome_x49RDna97o.png

Example to keep a combo command that runs 2 motors forward, power 4, for 5 seconds:
chrome_XLD7C6RAvQ.png

Remember that an IR command takes time to send (100-200 ms).
But I implemented a small queue (8 commands) in the Arduino code for PF IR commands.
So you can have 2 consecutive single outputs block for Red and Blue port.
Example:  This will start "RED" motor first then it will start the "BLUE" motor.  the delay between both motor starts will be as fast as the arduino can send the IR sequence for each one. 
chrome_ADGFT7iWP9.png

I might eventually add a Status PF Ready that will tell the IR engine is ready to accept another command.  We'll see.  More tests are needed first...

 

In my github, I added the new Lego9750_V2PF sketch.  https://github.com/BlissCA/lego-blockly/tree/main/SketchArduino

I used an IR LED I retrieved from OLD TV/VCR etc Electronics.  Not All IR Led are the same.   With mine, I had to use a 100 ohm resistor to get a 1 meter range...
The IR Led must be wired to D2 Pin.

 

I hope some people here will be able to test this...  Let me know how it works for you guys...

 

Edited by Bliss
Posted
6 hours ago, Bliss said:

So Copilot gave me an alternative code using Interrupt timers which is quite complex but it works great...

@Bliss,

that sounds totally cool again!!! It takes full advantage of the provided hardware capabilities! Thank you very much!!!

PF was so appealing to many, because of the PF remote control. I believe having a stationary PF code emitter is absolutely fine for stationary builds or one could use some sort of powerful "distributed IR light" emitters hooked up to the Arduino. Back in the days I did even try IR repeaters, but these were a pain (as expected) because they stated to interfere with each other. That is why I switched my PF receivers to RF with a really simple, but rather reliable hack:

But in any case, if I find any IR LED, I shall try! What I will do is routing pin2 to the outside via a terminal and then use that terminal to attach an IR LED via wires rather than mounting the LED to the case.

Best wishes
Thorsten      

Posted

@Bliss and all,

I just posted in "my" Control Center II thread, how I approached @amine's proposal of using Control Center as input pad for Control Lab (and thus providing storage and replay options). I know that cross posting is not going along the lines of EB, but this is much more about a programming issue I encountered, and I am sure, that it is - again - just me:

I wanted to make the code look a bit more elegant ... but could not define any new variables, such as "Input_1". I also ran into a maximum of 4 variables, which Blockly (not me) named i, j, k, l. That naming is fine with me, but I could not define "m", or any other variable. My goal was to have a task continuously monitoring Interface B's inputs, store the data and make them (globally) available to another tasks, e.g., displaying them or providing them to code that changes the outputs of Interface B.

Just to be clear: Connection to Interface B via BT was rock solid, as was connection to CC via Interface A V2/Arduino as well - it ran for hours! Also the code executed blistering fast, which is so nice as well.

Is there something I am missing? Defining variables that is? Everything else is totally awesome!!!

All the best and thank you so much for all your work on this!
Thorsten 

Posted (edited)
3 hours ago, Toastie said:

but could not define any new variables, such as "Input_1". I also ran into a maximum of 4 variables, which Blockly (not me) named i, j, k, l

Hello,

Can you give more details how and where you are defining these variables?

Because I can create a lot more than 4 variables using the Variables menu in the blockly toolbox.  (Using "Create Variable").
And name them as I wish.

Also, using the "Count" block from the Loop menu in the toolbox, this creates automatically variables i, j, k, m, n, o (I added 6 count block in blockly).

So I wonder in what circumstances and how you create your variables?

Maybe you could send your saved code (json file)?

Thanks! 

 

chrome_Mu5Jl87DcC.png

Edited by Bliss
Posted (edited)
12 hours ago, Bliss said:

Maybe you could send your saved code (json file)?

Thank you for looking into this!

The program you are showing is more or less what I wanted to do - scan then inputs and provide the data to other sections in the program (tasks).

EDIT: Below is just nonsense. It all happened, because I was hitting return instead of clicking on the blue OK button! Return just cancels, OK creates the new variable. Whatelse should OK do? I am sorry for the confusion.

I just checked: Using the "create variable" tool, it does not list any other variable after trying. The dialog box opens, I type in the new variable name, hit return, the box closes, but there is no new variable when I reopen the variables tab. I bet this is just me screwing things up! I need more training with LBlockly, focused too much on hardware I guess ;).

Here is the .json file: https://bricksafe.com/files/Toastie/lego-interface-b-9751/programming-questions/lego-project.json

I am using version  2026-06-10-2349

Best 
Thorsten

 

Edited by Toastie
stupidity
Posted

@Bliss

Something happened: I was visiting your Blockly website, and tried defining variables - without any program loaded, just a fresh screen.

First it was the same thing: No long name variable definitions possible. i, j, k work, but a did not anymore. Then I pulled i onto the workspace, changed it there to j (using its dropdown list). Worked. And from then on I can define names as I see fit ... 

Loaded the offline version - all works. I have no clue what changed ... it simply works.

Next was loading the program I linked to earlier - works also perfectly well now!!!

As said, yesterday I shut down my computer, restarted it. Did not work. Today same thing, then visited your website, tried did not work ...

BUT WAIT: OH SHHIT! I hit return instead of clicking on OK!!! I thought the blue OK button was the default ... hitting return means cancel, right? Oh my - I am so sorry! It all works as per usual: Perfectly well, I just need to remember to click OK!

All the best,
Thorsten

 

Posted (edited)
9 hours ago, Toastie said:

It all happened, because I was hitting return instead of clicking on the blue OK button!

I noticed that and it is indeed counter intuitive...  Hitting "ENTER" should be the same as OK...  Not cancel...
When I tried to create a variable at first I did the same mistake, i.e. just hit enter and no variable created... 
I did not make a fuss about it but now, since you point this out, I realize it is the kind of small issue that affects the quality of the experience...

I think we lost the correct behaviour after I added some code to correct other problems...
Often, while correcting a bug, we generate a couple others...
I'll try to see if it is fixable somehow...

Thanks for reporting...

 

EDIT: This is now fixed in version Version: 2026-06-13-1234

Now, pressing enter will default to OK.

Edited by Bliss
Posted
2 hours ago, Bliss said:

Often, while correcting a bug, we generate a couple others...

For sure - I am in no way any skilled programmer - but I have experienced the same issue so often. Fix one thing, breaks three other :pir-sceptic:

Well, I wouldn't even call this a bug; the blue button shouted out: Click me! The "return" key is just the "ultimate-good-ol'-days-if-you-press-things-will-happen" key. As in: "Do you want to proceed?" or "If you press return, all data will be erased" :pir-skel:

Thank you very much for your help!

All the best
Thorsten 

Posted

Others watch the WorldCup - I am not ... :pir-laugh:

Looking for interactive inputs for Interface B, I believe that the toy pad (LEGO Dimensions) is a viable and "LEGO approved" way of interacting with all the 9V world.

Is there any chance, @Bliss, that this may become available in the (remote!!!) future?

I am so fired up regarding LEGO Blockly ...

Best wishes,
Thorsten  

Posted
1 hour ago, Toastie said:

am so fired up regarding LEGO Blockly

You mean "powered up"? ;-)

1 hour ago, Toastie said:

toy pad (LEGO Dimensions)

I'm still looking on marketplace for this at a good price...
There are quite a few lego dimensions for sale on marketplace but once I eliminate the xbox dimensions ads, and toy pads only ads, tags only ads, over priced ads etc, not much remaining...
There is one though, that is a bit far but not out of reach...

So yes it is in the plan and will work on this as soon as I put my hands on a set...

Posted

Not sure if it's the right place. Hopefully, guys, u will like it. I'm glad to hear feedback

If you had the Star Wars Droid Developer Kit (or any Micro Scout set), you remember the mysterious "P" on the dial. LEGO shipped it but never announced or documented what it actually did — the manual just said "check the website," which never really came. "P" is the Micro Scout's programming mode: it reads commands as flashes of light (VLL — Visible Light Link) so almost nobody ever used it. Flash Force is a free web app that finally makes it simple — it turns your phone's camera flashlight into a VLL transmitter. Put the brick in P, aim the torch at its sensor, build a little program (motor moves, beeps, light actions) and flash it over. No app, no extra hardware.

Open on a phone (Android Chrome / iPhone Safari): https://flashforce.pages.dev/ 

Posted (edited)

@Toastie and all,

I finally found a Lego Dimensions Starter Pack (Batman) for Wii.

So I added a first draft of the Lego ToyPad support in Lego Blockly. (Version: 2026-06-24-1431)

I will add more blocks (specially for the Leds control) eventually.
For now you have one block to get the Tag Id of a particular region.  The tag id is an Hexadecimal String unique to the tag I guess.
And you have one block to control the LED Color (R, G, B.  0,0,0 = off).

EDIT 29-06-2026: I added blocks for LED Flashing and LED Fading too.

If you want to make a logic that fires according to a certain tag, you can print tag hex value in the status window using the Print block in the Control toolbox.
You place the tags on the regions and press RUN in blockly.
You can then copy paste the Hex string in variables...

chrome_iBXoQTvD1y.png  chrome_5vHVpuH8cZ.png

 

In the following example, I Run a motor on Interface B when any tags is on the Left Pad and stop the motor when the Tag is removed from the Left Pad
Also the Left Pad goes green with a tag and red without a tag:

chrome_B9RE7bl1lF.png

(I used a one-shot rising to avoid sending LED command every loop scan since I did not yet cache the led command... I will implement Cache soon.  Int.B output commands are cache already except for the reverse command...)
EDIT: I added Cache to every ToyPad commands so it will not send identical consecutive commands to the ToyPad.  I Removed the one-shot rising block in the previous example and everything appears to work flawlessly.

 

Let me know if it works for you.  I only tested with a Wii ToyPad.
I read that it shoud work the same for PS3 PS4 version but CoPilot tells me it might be different.  So please let me know if you have a PS3 PS4 ToyPad and if it works.

Thank you. 

 

Edited by Bliss

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...