Shop OBEX P1 Docs P2 Docs Learn Events
c ping troubleshoot — Parallax Forums

c ping troubleshoot

johnprokojohnproko Posts: 121
edited 2014-08-04 08:33 in Learn with BlocklyProp
hello all.
i am trying to upload this c code on to my propeller but it gives me an error.
wired as shown on the learn c website.
thank you!
751 x 949 - 141K

Comments

  • twm47099twm47099 Posts: 867
    edited 2014-08-04 07:38
    I typed your code into SimpleIDE and built it (using the hammer icon). It built without any errors. Here's a cut & paste of the code:
    /*   Blank Simple Project.c
       http://learn.parallax.com/propeller-c-tutorials 
     */
     #include "simpletools.h"                      // Include simple tools
     #include "ping.h"
     
    
     int main()                                    // Main function
     {
       while(1)
       {
         int cmDist = ping_cm(9); 
         print("cmDist = %d\n",cmDist);
         pause(200);
       }  
     }
     
    
    

    I'm using the windows version of SimpleIDE v 0. 9.45 and the latest version of the Learn libraries.

    Tom
  • jazzedjazzed Posts: 11,803
    edited 2014-08-04 08:33
    Thanks for posting a picture of your problem.

    If you just click the hammer again with the ping.c program as shown, it should build fine.

    The "ping.c *" in the tab tells me the file shown was not saved and error you got was for a different file contents. Clicking the hammer always saves the file first. Also, the build output does not show ping.c as the source (just the target), and this can happen if the file is blank.
Sign In or Register to comment.