Pixy2TerminalDisplay.svg Errors When Complied in solo.blockprop.com

Complied with and w/o collapse , program duplicated that shown in " Using BlockyProp Terminal to Show Color Signatures page 2
BlockProp connects , com port okay , and My Pixy2 has files - see attached
What Am I doing wrong ?

Comments

  • The fdser error suggests that the #include block might have gotten merged into the proceeding comment line, thus invalidating both the fdserial include and the comment.

    Could you switch to CODE view and take a look ? Maybe post a screenshot near the top of the code, where all the #include and #define statements are ?

    Looking for a suspect line something like this: #define mycomment #include fdserial;


  • JonnyMacJonnyMac Posts: 7,112
    edited 2020-06-23 - 19:02:19
    For reasons I don't understand -- but did experience when I was writing that code -- is that Blockly fouls the FDSerial assignments. You can see it in the error report that shows an object called fdser0_0.

    I fixed it by changing the pins in the serial block to 0 and 0, recompiled (to clear errors) and then put back the correct pin #s. Something is wonky going from the blocks to C.
  • Guys
    Thanks for your input - I'm just a retired engineer trying to mentor students and self teaching myself along the way for the last 5 yrs after retirement .
    I attached the files VonSzarvas suggested I look at " screendumps" however
    Frankly knowing the errors is one thing - but I don't have the expertise to correct the program
    Any suggestions ? I could go directly to Ken G.
    Attached are the rest of the error file and the code
    Screendump of a corrected code would help
    I can provide a email address
    Thanks for your input

    Al
    653 x 546 - 72K
    629 x 536 - 67K
    582 x 471 - 50K
    2526 x 3277 - 481K
    2526 x 3277 - 576K
    2526 x 3277 - 604K
    2526 x 3277 - 473K
    2526 x 3277 - 476K
    2526 x 3277 - 518K
  • The code reports show the issue Jon suggested. Not the one I thought you might have.

    fdserial object is defined with the name fdser5_4, whereas every statement uses another name, fdser0_0.

    Maybe you could add a custom code block to define fdserial with the right name.

    fdserial *fdser0_0;

    Or try the steps Jon explained.
  • JonnyMacJonnyMac Posts: 7,112
    edited 2020-06-23 - 20:53:04
    I have found that one error often creates others -- that make no apparent set. In the blocks view, change the pins for the serial block to 0 and 0 and then try to compile. Hopefully, all the errors will go away. If they do, set the serial pins back to 5 and 4 and re-compile. Again, I don't understand why Blockly sometimes fouls the object name, but I saw this while developing that code for Ken. When the serial object is working, the code works (Ken has posted multiple videos of it in use).
  • VonSzarvasVonSzarvas Posts: 2,084
    edited 2020-06-23 - 21:02:41
    I tried the code sample you linked (https://learn.parallax.com/sites/default/files/content/AB-Blockly/Projects/Pixy2/Pixy2TerminalDisplay.svg), but it had an array error.
    Maybe that code example was written for an earlier version of Blocky.

    The error seems odd, as I couldn't even click the CODE button to view the code! Just get a blank screen and lots of errors when attempting to compile. I think that's what you were seeing too - your screenshots look similar.


    So I've added the array init block to the top of the attached .svg file. This seems to fix all the errors, as the file compiles ok for me with solo.parallax.com.

    Could you try this version ? (The only difference is the very first block)


  • My understanding from talking to Jim is that these errors have been fixed in the latest version of BlocklyProp.

    Ken Gracey
  • Guys
    Thanks
    I'll try what VonStarvas attached , later I'll go after a later version
    But for next three days - vineyard - had 3 plus inches of rain in 24 hrs and must re spray -all protective coating to prevent mildew has been washed away - I now know what farmers have to go thru !!!

    Al
  • Downloaded latest BlocklyProp version- looks like the same I did before , also in downloading the Pixy2TreminalDisplay... clicking on the Download Pixy2 Treminal Display.svg icon , the BlocklyProp code comes up on my screen ( no little download message on the bottom left of my screen- it does not download ) . have to " Save As " what is on the screen to get it downloaded. It does not drop down as a regular downward in my download file .
    Ran again with new downloads and get the same compile errors as before
    Then
    When I used VonSzarvas " forum file " the compile errors were significantly reduced. just the" "fedser0_0" undeclared"
    see attached
    progress but not there yet
    Any suggestions ?
    697 x 579 - 61K
    601 x 498 - 61K
    697 x 579 - 61K
  • added first page of code as reference
    389 x 865 - 76K
  • VonSzarvasVonSzarvas Posts: 2,084
    edited 2020-06-25 - 19:19:31
    First thing... about the "latest version".... I don't think that's actually online yet. Both the online versions I tried still fail with the errors. As I understood Ken's advice, it meant that the software team have fixed the errors in the latest version, but that doesn't mean it got released yet.

    So with the array problem solved in the new code file, you are left with only the fdser_0_0 issue that Jon spotted earlier in the thread.

    Did you try his suggestion to resolve that ?

    If that didn't help, try adding a custom code block to make the definition for you.


    Edit: Attached screenshots showing how to add a custom global variable definition
  • If Allen is only left with the FDserial issue, it's a matter of renaming the constants in the Init block. Then it should run.

    It's been a pesky problem and we may not have transitioned the latest version over to Solo just yet.

    Ken Gracey
  • Guys
    Used VonSzarvas " forum " file and JonnyMac's pin change RX =5 TX =4 to Rx=0 TX=0 - compiled then back to RX= 5and TX=4 Compiled
    Loaded and ran successfully - got good read outs However ,even thought I saved the file again . when I signed out and back in I still had to do the repeat the pin changed over again to make it work
    Thanks for all your help
    What I really appreciate about this aspect of the Forum; Ken, Jon and and VonSzarvas is that you guys took the time and patience to walk me thru this in a timely manner
    Thanks
    to the Parallax Forum admin.
    Oh ! see I have several other discussion - those of prior dates have all been resolved and can be closed
    Al
  • Allen,

    The support is good, but the tool has a problem. It seems this is not fixed, so I'm checking in with higher authorities on the subject.

    Thanks for your patience along the way!

    Ken Gracey
Sign In or Register to comment.