I thought it was good to start a tread where posts containing test and finished code for the P2 could be shared. So, to start, here is my last prime number calculation program. See the file attached. It should work on Linux with p2gcc and loadp2. However, mind that I'm using the old versions of the compiler and loader that are provided via nix, so the code is not yet updated to support long long variables, and still uses some deprecated/redundant code. If you have the tools installed and your P2 ready, you only need to run the script.
Also, why not provide links to other programs, as these two provided by garryj:
- USB Mass Storage Demo v0.05: https://forums.parallax.com/discussion/comment/1462546/#Comment_1462546
- Mouse/keyboard: https://forums.parallax.com/discussion/comment/1462633/#Comment_1462633
In the same note, please feel free to post useful code, or reference other posts, here. You are welcome!
Kind regards, Samuel Lourenço