Gunners TekZone Posted December 29, 2024 Posted December 29, 2024 (edited) 32 minutes ago, Toastie said: As far as I am concerned, you can unleash the power of interface B only in programming mode. Pointing with the mouse or using hotkeys is fine, but naturally limited to changing the properties of one output at a time. I totally agree!! I refuse to use blocky, or whatever it is called, style programming with Mindstorms (the real reason I never got started with it when it first came out) or the same GUI with PyBricks (but I like Python). I am NOT a programmer (more a copy paste/manipulate script kiddy type... hehe)... But have been teaching myself new programming languages as much as able. BUT... I am also visually oriented, get really confused when a control is oriented vertically for a device laid out horizontally, colour is better than monochrome and mixed labeling is just painful for me to react too quickly... Of course, I am mostly housebound due ME/CFS and have 4 cats and LEGO, literally, all over the place... So my sanity might be in question... Ha! 3 hours ago, Bliss said: But actually, my ultimate goal, is to integrate some kind of basic language to allow the user to program logic interacting between inputs and outputs of more than one Lego Box. Looking forward to that... I started my self-taught entry into computers with BASIC waaaayyy back on the VIC-20 EDIT - I belatedly realised that you may have meant the wording "basic" in the traditional definition...That's fine, I will learn whatever language you decide to use. I managed with TC LOGO for my semi-automated train control test. And was hard to find instructions for that at the time.https://youtu.be/hLKNcO3VmvQ Edited December 29, 2024 by Gunners TekZone Quote
Toastie Posted December 29, 2024 Posted December 29, 2024 Dear all, as you guys know, I am one of the diehards (along with @alexGS, @evank, @LH4PI, and, well "so and so" many others) actually programming (in contrast to modern coding), uhm, BASIC. Or LOGO. Or AppleSoft BASIC. In my case, QBasic 1.1, QuickBasic 4.5, and yes, I have QBX (QuickBasic 7.1), Visual Basic for DOS etc ... they all use the same GUI, which I am familiar with since 1987 ... VB6 is my Windows programming language, phased out in 2000(?) ... Now that DOSBox-X has evolved into a rock-solid DOS emulator, still under vigorous further development, I am fully back into programming using BASIC. My goal is always to run compiled DOS EXE/COM programs on my 1985 IBM XT (without hard disk, but with GoTek "card" ;) This is just to remind you why an old fart is still posting such crap in this thread, when people like @Bliss are unleashing the full suite of today's coding environments! Which I >highly< appreciate!!! This is the way to go. Simple as that. Nevertheless, I am going to post my QBasic program for 9751 on BrickSafe, as I did for 9750 and Control Center I/II. I am so happy that all these wonders of LEGO electronics are happily listening to a language which was back in the day designed for the masses (me!). Here is just an example of a user program called from within my QBasic program (and this is, what I use to run robots and machines): SUB UserProgramB OutputPower O.A + O.B, 0 UPWaitForAnyKey OutputOn O.A + O.B FOR i% = 0 TO 7 OutputPower O.B, i% Delay .1 NEXT i% UPMessage ("Turn rotation sensor until clicks > 20") ClearCounter 8 DO: LOOP UNTIL IDProc(8, ROTCLICKS) > 20 OutputStop O.A + O.B, O.FLOAT END SUB And you have the full power of QBasic at your fingertips, no mouse required All the best, I am looking forward to what comes up here!!! Thorsten 21 minutes ago, Gunners TekZone said: I am NOT a programmer (more a copy paste/manipulate script kiddy type... hehe)... But have been teaching myself new programming languages as much as able. Ha! Hahaha! Same here! It is so much fun, isn't it, when others guide you with their code? As I said in my last post: Bliss simply "showed" me, in his/her code, what to use for doing a stop with float. This is the power of open source. Unfortunately, I am too dumb to do any GitHub stuff (nor is it warranted); as soon as my QBasic/DOS crap is ready to go, I'll post that on BrickSafe. No installation routines, just a plain .BAS program and a compiled .EXE (for DOS!) file All the best and let's kick this thread where it belongs: Top three posts in Technic (...) Thorsten Quote
Bliss Posted December 29, 2024 Posted December 29, 2024 (edited) 6 hours ago, Gunners TekZone said: It says... Stopped Opening Serial Port on COM2... Serial Port on COM2 Opened. Sending Initialization Message on COM2... Running on COM2 (But the STOP light on the interface is still lit) Stopped This only happens on any 1st attempt to Start Lego at initial start of application. Once past that 1st attempt, connection works as expected for both devices. Also, any attempt to change port while already running will crash app... similar to what happened when attempting to run 2nd device a few posts back. Thank you! Updated LegoDemo Program version Dot NET 8 This one should solve hopefully the First Attempt Connection fail and also the change of Com Port in the combobox while the Lego Box already running... Bliss Edited December 30, 2024 by Bliss Quote
Bliss Posted December 29, 2024 Posted December 29, 2024 2 hours ago, Toastie said: I also take the freedom of "suggesting" (nothing else!) a little change to your program: What I display in my QBasic program is the last rotation direction, as long as it stays the same. In your approach, the cw/ccw textbox briefly shows 1 then returns swiftly to zero, at least I believe so. Other than that: Nice(!!!) interface. Thank you for you feedback! As for the cw/ccw box, I think you confused with the Speed box. (I call this the speed but this is the amount used to increment the counter) cw/ccw is an indicator that shows the last direction of the rotation sensor. it is not the description of the followind box which is the speed. As for the Look, this is only a form to test the box, I did not want to put too much of effort to make it look like the real box. At least not for now. Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 (edited) I uploaded again with some colors (Inputs) and some delimiting lines for clarity and also added A,B,C...H in the label for the outputs... Lego Demo Form in dot NET 8 Edited December 30, 2024 by Bliss Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 (edited) 17 minutes ago, Bliss said: I uploaded again Wow... so quick with the updates :D I was still just testing the last... It now starts a connection on 1st try. As for the switching COM while running, there is still an error popup, but I think that might be "normal"?? And I also think I misread it and assumed a crash, when actually clicking on Quit, meant quit. My bad. Edited December 30, 2024 by Gunners TekZone Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 (edited) On 12/29/2024 at 7:22 PM, Gunners TekZone said: Wow... so quick with the updates :D I was still just testing the last... It now starts a connection on 1st try. As for the switching COM while running, there is still an error popup, but I think that might be "normal"?? And I also think I misread it and assumed a crash, when actually clicking on Quit, meant quit. My bad. Are you sure you use the latest updated program? Cause I see "Lego Modbus Server" in the form Window Title bar which is an old project I did in the past and I changed the title few iterations back. Do not use the Lego Interface B dot Net Framework version as I do not update it anymore for the moment. It should look like this now: (Removed Imageas it was a copy paste...) Edited January 10 by Bliss Removed Image Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 (edited) 23 minutes ago, Bliss said: Are you sure you use the latest updated program? Honestly... I don't know... Hah... I used to follow on your recommended path. Then thought I was finding and choosing the correct .exe once you just sent the zip link without the path... But I can get easily lost when unable to clearly focus. Unfortunately that is often my normal state :D But then I also started downloading them directly onto my LEGO PC, where the interfaces are normally plugged into... But which is much slower to extract (so more waiting, which causes my mind to wander) and then deleting the old folder so I don't get them mixed up. That might not be going as planned, hahhah. I'll try again on my main laptop... No interface currently hooked up here, but then once I know I have the correct one I can sneakernet it over. Hmm... Mine (from your last posted link) doesn't look like your image. Is this the correct path? C:\Users\Gunner\Downloads\LegoDemoB\bin\Release\net8.0-windows\publish\win-x86\LegoDemoB.exe Edited December 30, 2024 by Gunners TekZone Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 (edited) i uploaded just the EXE file (Zipped at 61k) too. Lego Demo Program Folder. Exe zipped file password is : lego Edited December 30, 2024 by Bliss Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 23 minutes ago, Bliss said: i uploaded just the EXE file (Zipped at 61k) too. OK, either I am due a nap ;) Or perhaps going cuckoo?? Not sure why I can't seem to get the correct app running all of a sudden. On my Win10 64bit Laptop (now with USB-Serial and one Interface connected), that executable just does it's ghost routine... Nada happens. On my QBOX LEGO PC - Win7 32bit, it just gives this error: Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 9 minutes ago, Gunners TekZone said: OK, either I am due a nap ;) Or perhaps going cuckoo?? Not sure why I can't seem to get the correct app running all of a sudden. On my Win10 64bit Laptop (now with USB-Serial and one Interface connected), that executable just does it's ghost routine... Nada happens. On my QBOX LEGO PC - Win7 32bit, it just gives this error: I just tried to download the Exe file zipped alone and Chrome tells me there is a virus pfff... I'll check how I can make this program safe for everyone... I'll also check if I can compile the project so it run on Win7 +. (It is not set for win 10+). Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 (edited) 1 hour ago, Bliss said: I uploaded again with some colors (Inputs) and some delimiting lines for clarity and also added A,B,C...H in the label for the outputs... Lego Demo Form in dot NET 8 And for a sanity check (for me that is)...Your last full zip link gets me this...AND - I see still managed to show the wrong screen clip of the link I really used... honest :P I used the one quoted above. Edited December 30, 2024 by Gunners TekZone Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 (edited) On 12/29/2024 at 8:51 PM, Gunners TekZone said: And for a sanity check (for me that is)...Your last full zip link gets me this...AND - I see still managed to show the wrong screen clip of the link I really used... honest :P When I click the same link I get: (See the name of the file) Might be a bug with Box.com... (Maybe you should clear your browser cache?) Edited January 10 by Bliss Removed Image Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 5 minutes ago, Bliss said: I just tried to download the Exe file zipped alone and Chrome tells me there is a virus pfff... That might have been just a False Positive due the fact that it is an .exe My AV didn't complain. 7 minutes ago, Bliss said: When I click the same link I get: (See the name of the file) Sorry, when setting up the screenshot it was on the wrong post... I meant the prior link (as was in the quote) where you had added colour and alphanumeric labeling. Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 (edited) @Gunners TekZone, I uploaded the files in dropbox: Dropbox link The EXE zip file is password protected . Pwd is lego (all lowercase letters) Edited December 30, 2024 by Bliss Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 1 hour ago, Gunners TekZone said: On my QBOX LEGO PC - Win7 32bit, it just gives this error: I checked the visual studio project settings and it appears to be compiling for windows 7, win-x86... Maybe it does not do for 32 bits version I don't know. Did you right click on the exe file, properties, compatibility tab and force for windows 7? Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 (edited) 1 hour ago, Bliss said: @Gunners TekZone, I uploaded the files in dropbox: Thanks. Unfortunately, I am still getting the same results. The direct LegoDemoB.exe - On Win10 64bit it does a ghost routine AKA nothing happens at all (compatibility adjustments didn't make a difference) and, yes, I made sure my USB-Serial adapter is plugged in (missing that in the beginning for me was the culprit). - On Win7 32bit it gave same error I posted before... Not sure how compatability down from there would matter. The full download of LegoDemoB folder will run on both computer/windows versions... But it is NOT the colourised, adjusted, version you posted an image of. I ran this path : C:\...\LegoDemoB\bin\Release\net8.0-windows\publish\win-x86\LegoDemoB.exe Showing screen of my LEGO Win7 32bit PC (as that is my main target for most of the vintage LEGO programs I run). But short of not seeing any error or result on the Win10 64bit PC, the results are the same. Somewhere, somehow, we ran into a disconnect with the app testing and ran into version/download troubleshooting :D We will figure this out I am sure. But I need to take a break and go watch some Netflix or something to get my mind off this for a bit. And thanks for your effort and patience with my apparent trouble getting your latest app to test. Edited December 30, 2024 by Gunners TekZone Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 (edited) 21 minutes ago, Gunners TekZone said: Thanks. Unfortunately, I am still getting the same results. So I did get this ghost behavior when I copied the exe to another directory on my computer. So I deleted ALL files and folders in my visual studio build bin folders and recompiled everything... I updated the Dropbox link above that I still include here: LegoDemoB recompiled files Thanks for your help. Edited December 30, 2024 by Bliss Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 30 minutes ago, Bliss said: updated the Dropbox link above that I still include here: LegoDemoB recompiled files Thanks for your help. You are welcome... I do enjoy testing stuff I want to use And YES!! Now this looks and runs as expected. Both download methods run, and on both PC/Windows versions. No more errors when I try to change COM ports when already running. Less trying to count my fingers (Lets see... 1=A, B=2... ) when figuring out the correct Out Port to click on (Yes, the battle is real ) I will play around with the app in more detail later... must eat... nom nom... Thanks again for your efforts in developing this, for all us enthusiasts!! Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 (edited) Ok, the only issues/ideas I have ran into so far are: - The Set Power slider adjustments still transfers settings across the two Interfaces. - And there needs to be some visible indication that an Output Port is active... I think simply highlighting the Arrow button that is active would be sufficient. - Perhaps a option to set one of the Yellow Inputs when a temperature sensor is used, so as to display the appropriate temp value in C or F (may need a "+/- calibration adjustment" option as is on Control Lab). Edited December 30, 2024 by Gunners TekZone Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 (edited) 8 hours ago, Gunners TekZone said: Ok, the only issues/ideas I have ran into so far are: - The Set Power slider adjustments still transfers settings across the two Interfaces. - And there needs to be some visible indication that an Output Port is active... I think simply highlighting the Arrow button that is active would be sufficient. - Perhaps a option to set one of the Yellow Inputs when a temperature sensor is used, so as to display the appropriate temp value in C or F (may need a "+/- calibration adjustment" option as is on Control Lab). Thank you. I just implemented those 3 items (Without calibration for the moment). Updated Dropbox LegoDemoB files Let me know. Bliss Edited December 30, 2024 by Bliss Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 (edited) 3 hours ago, Bliss said: I just implemented those 3 items (Without calibration for the moment). Good day, Unfortunately neither download ran on my Win7... Same "Not compatible" error as posted prior. On Win 10 the direct .exe ghosted. While the folder version opened, it looks and operates the same as the last one I tested. Might I recommend inserting development version numbers or something (perhaps on the GUI for the development timeframe?) to help us keep track one which one works or not. 3 hours ago, Bliss said: Let me know. Oops... sorry... neither seems to run on my Win 10 PC either, I apparently forgot to delete the prior folder from yesterday's final test The Date/Time stamp on the exe (in the folder) is 2024-12-30 10:45 AM Edited December 30, 2024 by Gunners TekZone Quote
Bliss Posted December 30, 2024 Posted December 30, 2024 1 hour ago, Gunners TekZone said: Oops... sorry... neither seems to run on my Win 10 PC either, I apparently forgot to delete the prior folder from yesterday's final test The Date/Time stamp on the exe (in the folder) is 2024-12-30 10:45 AM Hello, you may check back the Dropbox link in my previous post. I "published" using Fodi addon to make sure the exe in the publish folder was really a standalone. Because sometime, If I copy this exe alone in another folder and try to execute, it will ghost. But if I copy the whole publish folder with all its content, then the exe opens the form fine... Thank you! Quote
Gunners TekZone Posted December 30, 2024 Posted December 30, 2024 23 minutes ago, Bliss said: Hello, you may check back the Dropbox link in my previous post. Works great now, Thanks. Harder to find quibbles... But I'll keep trying The slider positions remain after a start/stop action (Just the visual, the actual settings reset to full) And for another aesthetic/beneficial suggestion... Perhaps make the Stop Lego button turn red when the interface is running? Again not critical with only 2 choices, and if an output is activated the nicely coloured arrows do show as connected. And on the note of device choices... In the next week or two, I should have a 3rd Interface-B delivered (and hopefully not requiring repairs). So if you want to expand to three (or more), I can help test that as well. 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.