Jump to content

Recommended Posts

Posted

Thanks. My lecture for the bed.

So. Everything is working, it's time to make a panel with multiple buttons, a resistor ladder will be a good start to control a lot of things from a single input port ! :pir-huzzah1:

Posted

I added in the latest version, a Highlight execution checkbox in the top bar.

This is for debugging if your code block somewhere for exemple.

This highlight the block(s) being executed...  In a non blocking application, you will not see much as loops goes fast, but in a blocking WAIT UNTIL or other situations, like a IF Condition that never go through...

This has to be checked before you press run.  But once running you can unchecked this option and this will stop the hightlighting...

Posted
6 minutes ago, Bliss said:

I added in the latest version, a Highlight execution checkbox in the top bar.

Very nice! As said next week, I'll break out my CM, RCX, Int A and Int B.

Now on the left column, last entries: I feel the "LEGO" as label is not really required, is it? Wouldn't "Int A", "Int B", and "RCX/CM" do it? I am asking because in the RCX drop down list, all the blocks are always referring to CM as well?

And finally: I guess the Scout (in my view largely underrated) as well as the Spybots should eventually also make it into LEGO Blockly. My reasoning: The Scout speaks natively VLL. Which means, the CodePilot as well as the MicroScout come into range (as "entensions"). The MicroScout has a light sensor, so has the CodePilot. That would complete the pre-NXT (BT) evolution of PBricks, all relying on IR or VIS light communication. That would be so cool! 

All the best
Thorsten 

Posted (edited)

@Toastie, thanks for the suggestions, I will probably change the toolbox category yes...  RCX/CM might become PBricks :-)

I found very difficult to find clear informations about the CM particularities, a lot of readings...  It is scattered here and there and I even had to check in the Bricxcc nqc source code which wasn't easy for me...

And debugging a code you try to implement for a Brick you don't own, as you saw for the CM and Int.A, it's a lot back and forth posts and waiting for replies etc...

You talk about VLL, I think I read about it somewhere...  maybe in the mindstorm sdk...  It uses the IR serial Hub I guess for that?  So this VLL is to command the Outputs only through IR?  No inputs reading?

Edited by Bliss
Posted
On 4/8/2026 at 5:58 PM, BrickTronic said:

What value is correct (Resistor placed at middle Pin of TO92) ?

@BrickTronic

Hi Jo,

would that photograph do it? See below.

Best,
Thorsten

1280x1002.jpg

4 minutes ago, Bliss said:

It uses the IR serial Hub I guess for that?  So this VLL is to command the Outputs only through IR?  No inputs reading?

@Bliss

VLL is LEGO's "visible light link". They abandoned of course ... they always do.

It uses light you can see. Red, blue, green etc. all work, white is best performing. I am using plain vanilla light fibers exceeding 5 m length (in addition to the thick LEGO plastic wires of short length, max. 20 cm, to speak to the MicroScouts on my train layout. There are several posts about that here on EB.

It is fairly easy to generated VLL pulses. The RCX can do it with the 9V lamp, the Scout does in on its output 3. The Scout has 9V 2 motor outputs and output 3 is the red VLL LED located at its front. Whenever you use a LEGO byte code for output 3, the Scout flashes its LED. There is fwd, rev, and so on. Let me find my posts regarding VLL for CodePilot and MicroScout ... here they are:

 

The CodePilot also recognizes VLL on its sensor, in addition it does react to light changes:

 

 VLL just reaches out to the two vintage "PBricks" (both, the MicroScout and the CodePilot can be scripted). The Spybot can do that as well.

All the best
Thorsten

 

Posted (edited)

   @Toastie, well that was a good read (VLL)... What a technologie :-)

Yes the modern computer are faster but when you run blockly you use a Multitasking OS Windows computer that is doing tons of stuff...  Me I have tons of other tabs openend in Chrome ;-)

Maintaining a perfect 20ms unit timeline in windows and chrome, I'm not so sure about that...  The pulses could vary when Chrome or OS are busy with some events...

When using an old IBM PC with MS-DOS, it was dedicated to the task of making pulses, nothing else could affect the timing...  It was like using a micro controller dedicated to this VLL task...

So...  I could try to implement VLL in Blockly directly using a FTDI (USB to TTL) with DTR+LED approach with no garantie the timing would always be precise...  I don't know how Lego VLL in devices is forgiving on the delays...
OR, we can rely on an Arduino Nano like we do for the Int.A.  We could even implement this in the sketch we use for the Int.A maybe?

I wonder if it's worth the effort...  I think I could implement a test block for the direct + FTDI approach and see how it goes...  Again I have no Devices to test this...  And it would be only to send data, not receive...

Edited by Bliss
Posted
3 hours ago, Bliss said:

using a FTDI (USB to TTL) with DTR+LED approach with no garantie the timing would always be precise...  I don't know how Lego VLL in devices is forgiving on the delays...

Well... Barcode scanner use barcodes... And the kid I was can go slow or fast on the barcode page and it worked flawlessly.

That said, it we add a device, instead of ttl we can go to good old Arduino that will take the command, wait for it to be complete, digest it, and only then activate his led output with the clean command ?

Posted

- crazy idea warning -

VLL can be a block that make black-white flash and voila... One can put his device in front of his screen and give orders to the device.

Ooooooooh I need to make YouTube videos with the codes of Lego 8479. :pir-oh:

Posted (edited)
5 hours ago, Wapata said:

- crazy idea warning -

VLL can be a block that make black-white flash and voila... One can put his device in front of his screen and give orders to the device.

Ooooooooh I need to make YouTube videos with the codes of Lego 8479. :pir-oh:

In the following document, they explain that refresh rates of computer screen will not work for VLL...  They are talking about Bar scanning though... 
But I'm pretty sure the same apply for a BK and WH dot on the screen...

https://www.elecbrick.com/lego/

I think the very best VLL solution today would be to have a BLE low power micro controller running on a Battery like the nRF52832...  or maybe some of the latest ESP32...  :-)

But I think if it could work with the direct FTDI DTR pin over a HC-05 BT FTDI, It could be also cool...  But I do not expect timing stability with this solution...

 

Edited by Bliss
Posted
2 minutes ago, Bliss said:

But I think if it could work with the direct FTDI DTR pin over a HC-05 BT FTDI, I could be also cool...  But I do not expect timing stability with this solution...

Back home, need to unload the minivan. 7 days of work around a 1960s house with 1500 m2 garden and a number of sheds, large workshop (within a separate small house) my father-in-law built. He died way too early 10 year ago. My mother-in-law is living in that house, but at age 85 things like making 2 m tall x 1 m wide new garden gates matching the self-built 2 m tall fence decades ago represent some challenges. But: Done. And the 1.5 x 1 m cover for the side entrance into the oil tank in the basement was another. Done as well ;)

Quick question on timing: Why does the DOSBox-X emulator running QBasic so well? It runs on my Windows 11 laptop with lots of other stuff open as well, but the milliseconds are matching very well the demands of VLL: I understand that a DOS computer running only one task can do it, but it also never failed under Windows running DOSBox-X + QBasic?

All the best
Thorsten    

Posted
3 minutes ago, Toastie said:

Quick question on timing: Why does the DOSBox-X emulator running QBasic so well? It runs on my Windows 11 laptop with lots of other stuff open as well, but the milliseconds are matching very well the demands of VLL

Good Question :-)

Maybe the Dosbox is very isolated and get its own CPU slot...

But the chrome app, I don't know when you use it as an installed app, but me, it runs in a Chrome Tab, if I go in another tab, the running blockly becomes totally non responsive.

But as I said I can try...  I should get my hands on a code pilot set today...  :-)

Posted
51 minutes ago, Bliss said:

In the following document, they explain that refresh rates of computer screen will not work for VLL

Well... Maybe for cathodic tubes ? I hade trouble with my LCD laptop but i can read barcodes with my phone screen using this page (randomly choosen from google, fun fact : it's hard to find the back of this page).

221.jpg

Posted
20 hours ago, Wapata said:

Thanks. My lecture for the bed.

So. Everything is working, it's time to make a panel with multiple buttons, a resistor ladder will be a good start to control a lot of things from a single input port ! :pir-huzzah1:

There are actually 4 touch sensors with different values. The grey touch and the 3 different Cybermaster touch sensors have different values so cm sensor reading is analog not 0/1

12 minutes ago, Wapata said:

Well... Maybe for cathodic tubes ? I hade trouble with my LCD laptop but i can read barcodes with my phone screen using this page (randomly choosen from google, fun fact : it's hard to find the back of this page).

221.jpg

I now have the barcode truck complete but need to make new cables and the included motors are fubar

Posted

I've seen something like that too but it's not at all what i see through the transparent sensors nor my multimeter. I behave exactly as my grey one.

I think Cybermaster tricked the people with those colors... 3 sensors, 3 input... 

Posted
7 minutes ago, Wapata said:

but i can read barcodes with my phone screen

You mean, you display the barcodes on your Phone display and scan it with the code pilot from you cell phone screen?

If you mean reading the code displayed on you laptop screen using your cell phone camera as a barcode reader, this is not the same thing...

 

3 minutes ago, AJB2K3 said:

There are actually 4 touch sensors with different values. The grey touch and the 3 different Cybermaster touch sensors have different values so cm sensor reading is analog not 0/1

I think I read somewhere something about CM touch sensors that had resistance and this allows to chain them on one input and still being able to know which touch was pressed...

I don't have enough info about this though...

 

Posted
5 minutes ago, Bliss said:

You mean, you display the barcodes on your Phone display and scan it with the code pilot from you cell phone screen?

Yes, and i've got a superb helicopter sound.

... and then had to go find my 8479 manual to scan back the full programmation of the truck (with a single barcode)

Posted
1 hour ago, Bliss said:

I don't have enough info about this though...

@Bliss, all,

9V touch sensors all have an internal resistance. It is its "carbonous" contact itself. I took one apart. There may actually also be some touch sensors which have a different resistance from the beginning.

Also, these sensors age. I have about 30 of those and depending on age and or wear and tear (the latter is more important), the resistance increases. Further, due to this setup, the harder you press, the lower the resistance. When you set the sensor type on an RCX to touch/no touch, some sensor may apparently totally fail. Which is nonsense, as you can simply set any threshold in A/D (raw) mode. There are more options, though. On page 100 onwards in the "RCX 2.0 Firmware" (available in Mindstorms SDK package), events are discussed, these include pressed/released, but also transition and change rate:

The full range of events is:
·  Pressed event (Event type 0)
·  Released event (Event type 1)
·  Period event (Event type 2)
·  Transition event (Event type 3)
·  Change-rate exceeded event (Event type 7)
·  Enter low range (Event type 8)
·  Enter normal range (Event type 9)
·  Enter high range (Event type 10)
·  Click (Event type 11)
·  Double click (Event type 12)
·  Mail box (Event type 14)     

The Scout has similar firmware routines.

For pressed/released raw numbers as for example ">1020 = released" everything else is "pressed" works always with all 9V touch sensors. One can infer the value in Ohm of the touch sensor when calculating with an internal 10kOhm resistor pulling the actual A/D converter port high (+5V); the external resistor is tied to ground on the RCX and thus a voltage divider results.   

The 4.5V touch sensor for IntA (and other stuff in the 4.5V TC world) has a solid metal contact inside, which actually tolerates quite some current flowing. You can switch 4.5V lamps with that thing. Not possible in 9V world.

Best
Thorsten  

 

 

Posted (edited)
3 hours ago, Bliss said:

I think I read somewhere something about CM touch sensors that had resistance and this allows to chain them on one input and still being able to know which touch was pressed...

I don't have enough info about this though...

Yes, The resistor is so that the software can work out which tool is connected. I remember seeing the data somewhere but cant even find it on Philo's home

Here is some basic info on the CM touch sensors. https://www.plastibots.com/index.php/2008/12/10/554/

Edited by AJB2K3
Posted
3 hours ago, Wapata said:

ll what i see through the transparent sensors

Okay... my bad, sorry... here is my sensors :look:

55200119312_29d191c7da_b.jpg

1 hour ago, Toastie said:

Further, due to this setup, the harder you press, the lower the resistance.

But it totally agree with that... and even repaired my sensors with a tape of cooper myself. 

Posted (edited)
58 minutes ago, AJB2K3 said:

Yes, The resistor is so that the software can work out which tool is connected.

True that! I just googled around and found this BrickOwl inventory:

https://www.brickowl.com/de/catalog/lego-cybermaster-set-8482/inventory

There are three color coded touch sensors (as you guys knew!) in trans-blue, each has a unique LEGO ID: 76126, 76127, and 76128. On BL they have alternative IDs: 76126 = 879c04.

On this picture, the resistor is clearly visible:

400x367.jpg

Just speculating: If the CM touch sensors have metallic switches coded by the resistor, then these would be superior to any gray "RCX" sensors!

The CM touch sensors are available on BL for really cheap - I guess I need to order some ... 

Best
Thorsten

38 minutes ago, Wapata said:

Okay... my bad, sorry... here is my sensors

NICE!!!

Was late to game! So cool.

:pir-huzzah2:

These are metallic switches, right? On the bottom? And the four 9V connector pins connected to the resistors do the encoding.

Wow. LEGO was SOOO much better in the past ...

Edited by Toastie
Posted
18 minutes ago, AJB2K3 said:

As far as I am aware, the only real difference is the addition of the resistor for identification.

But that is the thing, right? The gray sensors (with the cheap carbon contacts) are ideally all in one range - but they do age, I know for sure. Their closed contact resistance is supposed to be in the 500 Ohm range, but they go all over the place.

When you have a nice metal contact approaching 0 Ohm when closed (let this be 1 to 5 Ohms, but metals won't even go that high) than the additional resistor is (as accurately as its tolerance is), defining the closed resistance of that specific sensor.

Best
Thorsten

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...