Shop OBEX P1 Docs P2 Docs Learn Events
when using libraries nothing happen — Parallax Forums

when using libraries nothing happen

I've been trying to do Jons projects and if I leave libraie calls in for text output the code compiles and nothing happens. Loading the files into the editor like on the old editor doesn't help. I don't know what else to try. Any help or ideas?

Comments

  • JonnyMacJonnyMac Posts: 9,156
    edited 2021-03-21 21:19

    You'll usually find something like this at the top of my main() method:

    pub main()
    
      setup()
    
      wait_for_terminal(true)
      waitms(100)
    
      ... other code
    

    In my case, the setup() method will start the serial object so I can send messages to a terminal. The next line will force the program to wait until I've had a chance to open the terminal and enable it (e.g., PST). Once the terminal is ready, I can press any key to get things going. The true parameter in that method clears the terminal. I've recently added the 100ms delay after so I can see that the terminal did in fact clear and I know I'm running fresh code.

  • Maybe you should start with things described in the QuickBytes?

    Otherwise you need to give us a little bit more details?

    Who is Jons? ... I'd guess you mean JonnyMac ... Which object did you try?
    Does the program you want to run use jm_fullduplexserial? Then you should disable Run -> "Enable DEBUG" and you need to open the Parallax Serial Terminal after starting the program ... what happens depends on the demo ... if I remember correctly some have a waiting time and then start, some wait for you to hit a key in the input field of PST ...
    Does the program you want to run use debug? Then you need to Run -> "Enable DEBUG" and then start the program.

    If you randomly test demo-files, it is easiest to use Run -> Compile Current -> Load RAM for starting the compile & upload.

  • I think I miss stated the problem I'm having. When using the code you should I get nothing!! Nothing on the terminal and the LEDs don't flash. Nothing much happens, The compiler say all is well and I see the LEDs on the prop plugs flash but that's all. When I only leave the code for the LEDs to flash it works fine.

  • JonnyMacJonnyMac Posts: 9,156
    edited 2021-03-22 00:18

    Things to check:
    -- make sure you have the correct com port selected in the terminal
    -- make sure the baud rate of the terminal matches the baud rate of the project (usually 230400 for P2, but some other code uses 115200 [you can change this])

    Specifically, what program is giving you trouble?

  • MagIO2MagIO2 Posts: 2,243
    edited 2021-03-22 20:21

    It is hard to give good advice, if we still do not know the code you talk about. There is a nice function in the PropellerTool, which helps:
    File -> Archive "...."
    It stores the current spin1 or 2 file and all it's used objects in a zip-file, which you can then upload to the forum. This way we see the whole picture and can help.

  • Somehow I got things working. I've been busy for the last couple of days and last night I reinstalled the latest version of the spin tool and this morning low and behold it worked.. don't know why it all didn't work.

Sign In or Register to comment.