Jump to content

Recommended Posts

Posted
42 minutes ago, Bliss said:

Please, try it again when you can and post the results.

So, with Blockly 2026-04-08-1425 here is the result :

Using CyberMaster: true
DeviceLegoRcx.js:63 [CM null] Requesting serial port...
DeviceLegoRcx.js:207 Signature: ff ef 10
DeviceLegoRcx.js:150 Sent: fe 00 00 ff 10 ef 10 ef
DeviceLegoRcx.js:267 collected: 00
DeviceLegoRcx.js:305 [CM null] No reply for cmd 10 (attempt 1)
(anonymous) @ DeviceLegoRcx.js:305
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
alive @ DeviceLegoRcx.js:393
connect @ DeviceLegoRcx.js:99
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:150 Sent: fe 00 00 ff 10 ef 10 ef
DeviceLegoRcx.js:267 collected: undefined
DeviceLegoRcx.js:305 [CM null] No reply for cmd 10 (attempt 2)
(anonymous) @ DeviceLegoRcx.js:305
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
alive @ DeviceLegoRcx.js:393
connect @ DeviceLegoRcx.js:99
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:150 Sent: fe 00 00 ff 10 ef 10 ef
DeviceLegoRcx.js:267 collected: undefined
DeviceLegoRcx.js:305 [CM null] No reply for cmd 10 (attempt 3)
(anonymous) @ DeviceLegoRcx.js:305
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
alive @ DeviceLegoRcx.js:393
connect @ DeviceLegoRcx.js:99
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:316 [CM null] Command failed after 3 attempts: 10
(anonymous) @ DeviceLegoRcx.js:316
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
alive @ DeviceLegoRcx.js:393
connect @ DeviceLegoRcx.js:99
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:207 Signature: ff 5a a5
DeviceLegoRcx.js:150 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:267 collected: undefined
DeviceLegoRcx.js:305 [CM null] No reply for cmd a5 (attempt 1)
(anonymous) @ DeviceLegoRcx.js:305
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
_handshakeCM @ DeviceLegoRcx.js:139
connect @ DeviceLegoRcx.js:100
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:150 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:267 collected: undefined
DeviceLegoRcx.js:305 [CM null] No reply for cmd a5 (attempt 2)
(anonymous) @ DeviceLegoRcx.js:305
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
_handshakeCM @ DeviceLegoRcx.js:139
connect @ DeviceLegoRcx.js:100
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:150 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:267 collected: undefined
DeviceLegoRcx.js:305 [CM null] No reply for cmd a5 (attempt 3)
(anonymous) @ DeviceLegoRcx.js:305
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
_handshakeCM @ DeviceLegoRcx.js:139
connect @ DeviceLegoRcx.js:100
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:316 [CM null] Command failed after 3 attempts: a5
(anonymous) @ DeviceLegoRcx.js:316
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:190
_handshakeCM @ DeviceLegoRcx.js:139
connect @ DeviceLegoRcx.js:100
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:63 [CM null] CM did not respond. Power it on.

Both device blink, but not as it does with BCC. The mobile device may not have enough time to answer.

You : Blink... Blink _ _ _ Blink... Blink _ _ _ Blink... Blink for the tower.

Bcc : Blinl Blink Bliiiiiink... Blink Blink Blink for the tower

Posted

@wapata, thank you

From your post, I can see : "collected: undefined".  Which tells me I do not READ anything from the tower...

Maybe I have to start by sending something to the Tower to initialize it...

It's difficult to find the detailed low level information about CyberMaster...

I'll dig more...  Let's keep hope...

Posted

It's 5PM on your side, 9PM on mine. we work with a certain delay here :purrr:

Have you seen the last link of the previous page ?

Posted (edited)

@Wapata, @AJB2K3

I think I found someting.  In the NQC code I can see they put the DTR Pin HIGH and RTS pin LOW for the CM only.

		case kCyberMasterMode:
			fSerial->SetSpeed(2400, kPSerial_ParityOdd);
			fSerial->SetDTR(true);
			fSerial->SetRTS(false);
			return kRCX_OK;


I think I read something about that already here.

So I added the code to do that in the last version.  Can you try again please?

I removed the Alive command for now and just left the UNLOCK command.

So now when you connect, I Set DTR High and RTS Low, I wait 100 ms, then I send the unlock command.

Edited by Bliss
Posted (edited)

It's not the same pattern, it blink slower but only three times now

[CM null] Requesting serial port...
DeviceLegoRcx.js:215 Signature: ff 5a a5
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: f8 df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 1)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: 5a a5 4a b5 75 8a 73 8c 74 8b 20 df 61 9e 20 df 62 9d 69 96 74 8b 20 df 6f 90 66 99 66 99 20 df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 2)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 3)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:324 [CM null] Command failed after 3 attempts: a5
(anonymous) @ DeviceLegoRcx.js:324
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:63 [CM null] CM did not respond. Power it on.

Source Code Version: 2026-04-08-1522

Hey, there is data on "collected" :pir-sweet:

Edited by Wapata
Posted (edited)

@wapata, I can see you have something in the "collected" now...

There is something going on...

The series in one of the "Collected" stream is

4a b5 75 8a 73 8c 74 8b 20 df 61 9e 20 df 62 9d 69 96 74 8b 20 df 6f 90 66 99 66 99 20 df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de

Which represent the Reply phrase we look for: Just a bit off the block!.

But the preamble is not complete (should be FF, 5A, A5.  Not just 5A, A5), etc...

Fist Collected contains: øthe block!è
Second Collected contains: Just a bit off the block!
Third Collected contains: øthe block!è

Edited by Bliss
Posted (edited)
Using CyberMaster: true
DeviceLegoRcx.js:63 [CM null] Requesting serial port...
index.html:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001200-0000-1000-8000-00805f9b34fb, name='88:4D:7C:E9:50:F4'
index.html:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001124-0000-1000-8000-00805f9b34fb, name='88:4D:7C:E9:50:F4'
index.html:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001124-0000-1000-8000-00805f9b34fb, name='C0:44:42:C7:F1:B9'
index.html:1 Chooser dialog is not displaying a port blocked by the Serial blocklist: bluetoothServiceClassId=00001200-0000-1000-8000-00805f9b34fb, name='C0:44:42:C7:F1:B9'
DeviceLegoRcx.js:215 Signature: ff 5a a5
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: 00 ff 5a a5 4a b5 75 8a 73 8c 74 8b 20 df 61 9e 20 df 62 9d 69 96 74 8b 20 df 6f 90 66 99 66 99 20 df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 1)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: ff 5a a5 4a b5 75 8a 73 8c 74 8b 20 df 61 9e 20 df 62 9d 69 96 74 8b 20 df 6f 90 66 99 66 99 20 df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 2)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: ff 5a a5 4a b5 75 8a 73 8c 74 8b 20 df 61 9e 20 df 62 9d 69 96 74 8b 20 df 6f 90 66 99 66 99 20 df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 3)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:324 [CM null] Command failed after 3 attempts: a5
(anonymous) @ DeviceLegoRcx.js:324
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:63 [CM null] CM did not respond. Power it on.

hmn first two bytes are missing but getting the 5 flashes like I did in the other topic.

Edited by AJB2K3
Posted
7 hours ago, Bliss said:

So How does LL count an Int.A Input when you turn the disk wheels (4 BK 4 WH and 8BK 8WH stripes)?

Does LL count Inputs 7/6 on Raising edge (0->1) and count on Falling edge (1->0).  Which would give the most resolution.  I believe, the Rotation sensors in the 9V Int.B / Rcx does this.

Does LL COUNT counts indefinitely with no reset? I doubt it. 
If there is no reset, then it must rollover?
What is the count after a complete disk turn, say for 8B/8W disk.  Is it 8 counts (Raising edge only) or 16 counts (Raising + Falling edges).
If we keep turning the disk after one turn, does the count rollover and starts again with 0, 1, 2...?  Not very practical but if there is no reset it might be the case.  In @Gunners TekZone LL programs, I see max count to 15 and 10...

From my sophisticated tests using an optical sensor and a wheel turned by hand... Yes, the software appears to count at every change:  EG, Starts ON to - OFF - ON - OFF = 3

There is no RESET as I think you think of it... At each COUNT command LL is just counting changes from 0 and comparing to what I have in my code.  Once they match (or exceed I guess) it starts or completes a loop as coded.  It will probably go up to 255 then loop to 0, being a program for 8- bit computers, but I have never checked as my wee robot arm simply doesn't move or rotate that much.

Posted
17 minutes ago, Bliss said:

Second Collected contains: Just a bit off the block!

This one is the good one no ? Why it didn't go further?

Posted
1 minute ago, Wapata said:

This one is the good one no ? Why it didn't go further?

Because it is missing the complete Signature: ff 5a a5 that is execpted to be in the reply...  There is a timing issue maybe, it is like I don't read every bytes...  I think there is some progress though...

Posted (edited)
8 hours ago, Bliss said:

Thany you for your time testing.

So can we say the POC for Int.A vs Arduino vs Blockly is a success ? (POC = Proof Of Concept).

Does the Arduino and sketch do their Job.  Is it fast enough.  Any timing problems?

Did the loop while until worked with the input 6?  Did the Count "on change" of Input 7 did the same as the Lego Lines (LL)?

Did you have to tweak the blockly code version of your LL code I provided to make your Arm work like it does with LL?

Thanks Again!

You are welcome!

Re: POC...  Yes, "This was a triumph
I'm making a note here, 'Huge success'
It's hard to overstate my satisfaction"  -  GlaDOS


However, NO, the Blockly code you provided needed some positional modifications right out of the gate.  I was working on a shorter one to screenshot what order worked, but got frustrated due things I have explained prior... I will try again today.

Edited by Gunners TekZone
Posted (edited)

@AJB2K3, your log shows collected replies that seems to be complete but I do not see in the reply the ECHO of the command we sent...

So I made some modifications to forget about the echo of the command.

Let's try the newer version.  2026-04-08-1616

@Wapata, let me know too

 

31 minutes ago, Gunners TekZone said:

There is no RESET as I think you think of it... At each COUNT command LL is just counting changes from 0 and comparing to what I have in my code.  Once they match (or exceed I guess) it starts or completes a loop as coded.  It will probably go up to 255 then loop to 0, being a program for 8- bit computers, but I have never checked as my wee robot arm simply doesn't move or rotate that much.

Now I wonder if the number you put in LL for the COUNT instruction, represents a relative count.

If internally, the count is 100, then 15 would mean wait for the count to reach 115...

Which has the same result as to reset the count each time to 0 and wait until it reaches 15...

Also, for the output commands, does the number represent the time in second?  If there is no number for an output instruction, it goes immediately at the next line with no delay other than internal CPU speed?

Edited by Bliss
Posted
8 minutes ago, Bliss said:

 version.  2026-04-08-1616

Here it is !

Using CyberMaster: true
DeviceLegoRcx.js:63 [CM null] Requesting serial port...
DeviceLegoRcx.js:215 Signature: ff 5a a5
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: c0 5a a5 4a b5 75 8a 73 8c 74 8b 20 df 61 9e 20 df 62 9d 69 96 74 8b 20 df 6f 90 66 99 66 99 20 df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 1)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 2)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:158 Sent: fe 00 00 ff a5 5a 44 bb 6f 90 20 df 79 86 6f 90 75 8a 20 df 62 9d 79 86 74 8b 65 9a 2c d3 20 df 77 88 68 97 65 9a 6e 91 20 df 49 b6 20 df 6b 94 6e 91 6f 90 63 9c 6b 94 3f c0 85 7a
DeviceLegoRcx.js:275 collected: df 74 8b 68 97 65 9a 20 df 62 9d 6c 93 6f 90 63 9c 6b 94 21 de e8 17
DeviceLegoRcx.js:313 [CM null] No reply for cmd a5 (attempt 3)
(anonymous) @ DeviceLegoRcx.js:313
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:328 [CM null] Command failed after 3 attempts: a5
(anonymous) @ DeviceLegoRcx.js:328
Promise.then
enqueue @ DeviceLegoRcx.js:69
rcxCmd @ DeviceLegoRcx.js:198
_handshakeCM @ DeviceLegoRcx.js:147
connect @ DeviceLegoRcx.js:108
await in connect
connectRcx @ deviceManager.js:133
document.getElementById.onclick @ main.js:640Understand this warning
DeviceLegoRcx.js:63 [CM null] CM did not respond. Power it on.

But i need to go sleeping right now, see you tomorrow ! (fun fact : as i'm 5 hours in your futur, i can give you news before the TV ! :drunk:)

Posted

@Wapata, thank you for your help.

Your replies are not complete as compared to @AJB2K3.

Probably not the same USB/RS232 adaptor and chipset...

I will need to tweak some timing I guess...  

Posted
14 minutes ago, Bliss said:

Now I wonder if the number you put in LL for the COUNT instruction, represents a relative count.

In LL all COUNT commands assume an absolute value starting from 0.  I just assumed it can't count further than 255 

 

15 minutes ago, Bliss said:

Also, for the output commands, does the number represent the time in second?  If there is no number for an output instruction, it goes immediately at the next line with no delay other than internal CPU speed?

Yes.  Also, I believe it could go as fine as 1/10th of a second.

Posted

OK folks, simply too much for me. I am zooming out. I can't focus on CM, RCX, IntA, IntB, at the same time.

Whenever there is something that works (IntB + Blockly does, right? IntA is in the works, so is CM, and RCX ...) I'll get back.

All the best
Thorsten

Posted (edited)
27 minutes ago, Toastie said:

OK folks, simply too much for me. I am zooming out. I can't focus on CM, RCX, IntA, IntB, at the same time.

I hear that!!  My "philosophy" here is stick around to do a few confirmation tests and/or suggestions for clarity... To help @Bliss with this incredible achievement.  But alas, I am not ready to use Block coding for actual projects.

@Bliss  On this note... And while it might be a little too late?  I am not sure what language and format base you are using for Blockly, or if it is of your own design.  But I would like to recommend following as close as possible the block coloring and function that PyBricks uses for their Block code.  That way one can better switch between both LEGO programming types (as they simply don't focus on older stuff like the tethered and/or "dumb" Interfaces).

But also so one can better assist in development by comparing what works on PyBricks, like counting loops, etc.  

-----------------------------------------------

Ah, but of course... I now see that their Block programming is behind a paywall... So hmmm... Oh well, it was just an idea :pir_tong2:

Edited by Gunners TekZone
Posted
3 minutes ago, Gunners TekZone said:

I hear that!!  My "philosophy" here is stick around to do a few confirmation tests and/or suggestions for clarity... To help @Bliss with this incredible achievement.  But alas, I am not ready to use Block coding for actual projects.

@Bliss  On this note... And while it might be a little too late?  I am not sure what language and format base you are using for Blockly, or if it is of your own design.  But I would like to recommend following as close as possible the block coloring and function that PyBricks uses for their Block code.  That way one can better switch between both LEGO programming types (as they simply don't focus on older stuff like the "dumb" Interfaces).

But also so one can better assist in development by comparing what works on PyBricks, like counting loops, etc.  

-----------------------------------------------

Ah, but of course... I now see that their Block programming is behind a paywall... So hmmm... Oh well, it was just an idea :pir_tong2:

I do not know about pyBrick much to be honest.  The block programming is not free, but I think Python library is free.

I will probably check eventually.

Since this is an application that runs in a browser, I use JavaScript.
But I think I've read somewhere that Blockly is providing libraties in more languages like python for standalone applications...
So to keep everything at best performance, I use the browsers native language which is JS...

 

Posted
6 minutes ago, Bliss said:

I do not know about pyBrick much to be honest.  The block programming is not free, but I think Python library is free.

Yes, Python part is totally free.  The Block part starts at $7.50 CA / month or $79.00 CA for life (perpetual licence).  I think I tested the block side once or twice when it was free... And hated it... And have since only ever used their Python side.

 

8 minutes ago, Bliss said:

Since this is an application that runs in a browser, I use JavaScript.

OK, I am embarrassed to say that I didn't catch on about Blockly being a Google project :innocent2:  Now some of @Toastie's comments/questions make more sense.. Doh!  

Carry on as you were :grin:

Ah, JavaScript... Yes I learned me a bit of that in Node-Red... The only graphical programming style my mind seemed to be able to work around.  Possibly due their more "free" range layouts joined by connecting "wires" conforms to electrical breadboarding?  As opposed to Blocks "magnetic" snap (that always confounds me to get correct) and generally vertical progression.

Posted (edited)

@Bliss  ARGGG... OK, using your long version of my LL code, I just isolated the beginning routine (adjusted to work) showing how I set and moved my arm with one end stop input and one optical rotation input.

And realised that the end stop wasn't stopping the code?!?! (I didn't notice on the robot as the motors simply stalled quietly) and thus never got to the counting part.

However, as I was trying to arrange a screenshot (and getting rid of non-relevant blocks, to clear the screen and my mind)... It somehow it mixed up and/or erased (again) the relevant code that I had scrolled away from to get at the rest.   And whatever Undo does is well, not what is expected (placed random blocks and comments in odd locations)... And only seems limited to one or two steps back?  Bah!

And the method of grabbing a group of blocks (no rubber banding?) still confounds me as to where to grab what to do what I expect.

Again, Bah... I do NOT like block programming. 

Another coffee... And then I might try again with something even simpler from scratch, to determine if the sensors are working as I thought they were *huh*

Edited by Gunners TekZone
Posted (edited)

@Gunners TekZone, did you try to hold ctrl key while moving out a block inside a group of blocks with the mouse?

When you have many inline blocks, choosing a middle block with a mouse and dragging, moves also all the block below it.

But, ctrl-mouse and drag will actually move only the selected block out... 

I'm still discovering things with blockly when I use CTRL, SHIT, ALT key and also when I right click on blocks, in the code are, etc...

I think you will eventually LOVE block programming when you find out all the possibilities ;-)

I remember how reluctant I was about block programming.  But the more I learn about it, the more I like it!

And the idea is to make blocks that are intuitive and makes lots of things in the behing the scene...

So it will improve as I plan to add other helpfull block in a near futur.

I like the "connecting" feeling.  I find Block Programming like Block building.  It is as fun to me.

Edited by Bliss
Posted (edited)
10 minutes ago, Bliss said:

did you try to hold ctrl key while moving out a block inside a group of blocks with the mouse?

No... I have a bad memory for using KB/mouse combo keys... I just click and drag :innocent2:

 

 

This is what I mean.  I need to see a bigger picture to figure out something in a flow... But with blocks, it gets too small as to be readable for me *huh* 

BUT finally I was able to "see" it...  Oh my goodness, there is a Sub Routine at the end that makes the UpdateOutputs block work!! 

And here I was thinking this was just a progression of blocks going from top down and wrap back up to top right and down again, etc. (as in writing text in three columns).  So every time I erased the last part, it messed up those blocks.  And for some reason undo didn't bring that group of code back.

:ugh:

2026-04-08-15.26.15.jpg?rlkey=xcogoq41wf

 

Edited by Gunners TekZone
Posted (edited)

OK... This little startup process works, right up until the limit switch.  Which IS showing about 4v on the Arduino A0 pin (and on A1, as it happened to land just right on the rotation sensor as well).

EDIT:  I figured out how to show the Input 6 value... Hmm, perhaps 888 isn't enough to trigger as ON? 

Odd values, as the switch I am now using is the original 4.5v one that is simple ON/OFF... With no option for any "pressure variance".  Perhaps, since the Int-A inputs do not seem to offer much in "range", the Arduino should just use a GPIO and not an Analog pin?  That might make any counting (if I can figure out that part) much more reliable as well.

Simple-code-fail-with-value.PNG?rlkey=us

 

Edited by Gunners TekZone
Posted (edited)
1 hour ago, Gunners TekZone said:

Perhaps, since the Int-A inputs do not seem to offer much in "range", the Arduino should just use a GPIO and not an Analog pin? 

I agree, should be digital inputs on arduino, but did not want to change that part of LVL1 design...  (Maybe they did this to allow for custon sensors using potentiometer I don't know)

I just changed the threshold to be ON to 512.  So reload you page to get the latest version...  (It might update to latest version by itself...)

Thank you for the good find.

 

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.

  • Recently Browsing   1 member

×
×
  • Create New...