Wapata Posted Saturday at 06:39 AM Posted Saturday at 06:39 AM 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 Quote
Toastie Posted Saturday at 07:04 AM Posted Saturday at 07:04 AM 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 Quote
Bliss Posted Saturday at 09:11 PM Author Posted Saturday at 09:11 PM (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 Saturday at 09:43 PM by Bliss Quote
Bliss Posted Saturday at 09:29 PM Author Posted Saturday at 09:29 PM (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) Using the blue gear , you can change the type of values (Number, Text, Bool and even a custom drpbox) The Boolean is interesting as it gives a checkbox. Edited Saturday at 09:42 PM by Bliss Quote
Bliss Posted Sunday at 02:44 AM Author Posted Sunday at 02:44 AM (edited) I added the Interactive Slider Block (Category "Control" -> "Interactive Control"): 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. Edited Sunday at 02:59 AM by Bliss Quote
Wapata Posted Sunday at 06:46 AM Posted Sunday at 06:46 AM 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. Quote
Toastie Posted Sunday at 08:59 AM Posted Sunday at 08:59 AM (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 . 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 yesterday at 09:28 AM by Toastie Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.