Jump to content

Recommended Posts

Posted
11 hours ago, Wapata said:

install CyberMaster in English to test

Annnnnd it work. Crazy that nobody corrected that since 1998, the game work in English and not in French ! Maybe I will have the courage to triple check in French later 

Posted
7 hours ago, Bliss said:

Specially when you talk about No serial outputs? (Blockly only use serial...)

@Bliss

I removed output blocks and let just the timer with no further commands loop. For the input testing I need the output pulses.

So I have "no output blocks, no input loop", "with output blocks, no input loop" and "with output and input loops"

Best
Thorsten 

Posted (edited)

@Toastie,

I understand more now.

 

14 hours ago, Toastie said:

with output and input loops

For your test, it would have been interesting to have the number of pulses sent vs the number of pulses received (with the counter).

 

I did some test too, with the arduino int A and also the Interface B.  (But not with output wired to input)

The timer function is not extremely precise as it depends of the overall Execution time.  So when we put a preset of 0.05 sec it may ends at elapsed time of 0.055 and more...  Even worst when preset is 0.005 s.
So when requesting a 100 hz pulse, for sure you will not achieve the exact frequency for the output...
Because, a task loop by itself, takes about 0.005s at each iteration...  It's because of the yield time that is internal to the task loop.
The yield time is important to make the system  responsive but it's affecting the task loops scan time for sure.

The Serial commands are also affecting to as it takes some time to execute, even if I changed the baudrates to 115200, It just improved slightly the results...

The best would be to make int.A like the Interface B...  I.e., internally reading continuously the inputs packet and memorize the last state.  Then Blockly input instruction would just read the memory...
Also, use bytes commands (opCodes) rather then ASCII commands...
And maybe, count inputs inside the arduino...

I'm going to modify the Int.A logic (arduino and in blockly) to optimize more...

 

Edited by Bliss
Posted (edited)

I added in the newest version, an interactive value block that allows to change values while the blockly program is running:
(The number interactive value could be used in the power input of Int.A/B output block to vary the speed live, I'm also planning to add a slider block but I'm not sure yet)

chrome_jqKxatCrza.png

Using the blue gear , you can change the type of values (Number, Text, Bool and even a custom drpbox)

chrome_agDRtBT6K4.png

The Boolean is interesting as it  gives a checkbox.chrome_iriETalwa2.png

Edited by Bliss
Posted (edited)

I added the Interactive Slider Block (Category "Control" -> "Interactive Control"):

chrome_2TlwbMZp6c.png

With the blue gear, you can adjust the Min Max and Step.  In this example, for Int.B, the power can be 0 to 7 step 1.

chrome_3ibN2SJPB9.png

Edited by Bliss
Posted

This is very cool 😀 

I don't have my computer near but is there also random numbers (with min and max) generator ?

I will try to make a program to make a playable Crusher game.

Posted (edited)

@Bliss

These are very cool new features!

Back to the serial line: At the +100kBaud speed, it works perfectly fine. 

On 4/18/2026 at 11:11 PM, Bliss said:

For your test, it would have been interesting to have the number of pulses sent vs the number of pulses received (with the counter).

I did that for initial testing (@19200 Baud) using the "display" block in the pulse generating task. Both, the pulses generated and counted in the main program were always identical. I removed the "display" block, as screen output is always severely slowing down any loop rate - in QBasic and on all my other vintage machines. This may not be an issue on modern programming environments anymore :pir-sweet:. So I simply removed that block, as I knew no pulse count is missed.

I did the same @+100kBaud - always the same numbers in the "display" and "counter" block.

The program shown above speeds up by +25% at 100Hz when using the 100+ kBaud serial data line (outputs/inputs) - if this is how it works: Only when using an "out" block, the serial port is called. Now, there are these input/output buffers (in QBasic; these help a lot when connecting to IntB). So I guess there is some buffering, but it is very nicely handled? No single pulse/pulse count loss!

Which also means that any further Baud rate increase would not benefit the loop speed as an 6-fold Baud rate increase leads to an overall 25% loop speed increase (using in/out blocks, which is significant!)

All the best
Thorsten

P.S.: For IntA, higher sampling rates in the count block are hardly necessary at all.

Edited by Toastie

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...