Shop Learn P1 Docs P2 Docs
Pixy2TerminalDisplay.svg Errors When Complied in — Parallax Forums

Pixy2TerminalDisplay.svg Errors When Complied in

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 ?
900 x 734 - 95K
1039 x 884 - 102K
1179 x 713 - 141K


  • 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: 8,147
    edited 2020-06-23 19:02
    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

    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: 8,147
    edited 2020-06-23 20:53
    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,727
    edited 2020-06-23 21:02
    I tried the code sample you linked (, 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

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

  • 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
    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,727
    edited 2020-06-25 19:19
    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
    to the Parallax Forum admin.
    Oh ! see I have several other discussion - those of prior dates have all been resolved and can be closed
  • 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
  • I'm getting an unable to compile error when trying to run the Pixy2TerminalDisplay.svg

    single.c: In function 'pixy_get_response':
    single.c:156:18: error: 'list' undeclared (first use in this function)
    single.c:156:18: note: each undeclared identifier is reported only once for each function it appears in
    single.c: In function 'extract_version':
    single.c:167:10: error: 'list' undeclared (first use in this function)
    single.c: In function 'extract_resolution':
    single.c:190:10: error: 'list' undeclared (first use in this function)
    single.c: In function 'extract_block':
    single.c:216:10: error: 'list' undeclared (first use in this function)
    single.c: In function 'extract_word':
    single.c:296:10: error: 'list' undeclared (first use in this function)
    single.c: In function 'show_signatures':
    single.c:330:21: error: 'list' undeclared (first use in this function)

  • Hi!
    Did you try the version of Pixy2TerminalDisplay.svg that I attached to post #7 above ?

  • IT WORKED! Thank you. One of my students is trying to use her ActivityBot to track objects and couldn't get past the terminal. Thank you again.

  • PublisonPublison Posts: 12,340

    @VonSzarvas said:
    Did you try the version of Pixy2TerminalDisplay.svg that I attached to post #7 above ?

    Looks like the file from #7 is corrupt towards the bottom of the .SVG

  • @Publison said:

    @VonSzarvas said:
    Did you try the version of Pixy2TerminalDisplay.svg that I attached to post #7 above ?

    Looks like the file from #7 is corrupt towards the bottom of the .SVG

    Works from here... does it look right if you open with notepad?

    Some ideas...
    Sometimes Windows "forgets" how to open .svg files properly. I have a fix for that if you hit the problem that when opening the .svg file, your Chrome-based browser tries to download the file instead of opening it. Maybe that is what you are seeing? Or maybe you've some sort of malware scanner that doesn't like .svg ?

  • I think that the serial blocks might be a problem - maybe not. Make sure the serial I/Os to/from the camera are properly defined wherever they are used. At one point in the past, these would reset to some defaults. I imagine that has been fixed, but I am not certain without some research.

    Ken Gracey

  • PublisonPublison Posts: 12,340
    edited 2022-01-14 19:38

    This is what I saw from Post#7 download

    This is what I saw.

  • That looks fine.

    I guess the pale background debugging section caught your eye? That block (function) is disabled by default, hence the different appearance to the other active blocks.

Sign In or Register to comment.