Is there a library of PicAxe code, subroutines, etc.?

Greetings,

I'm totally new to the PicAxe world, and except for the "Code Snippets" category on the forum, I haven't been able to find something like a large library of often-used code examples, such as what might be used with LCDs, a compass or altimeter, or for controlling various external chips, SD cards, etc. Are there such libraries where one-stop-shopping is possible or do we have to search through code snippets to find what we're looking for?

many thanks.
 

JimPerry

Senior Member
or do we have to search through code snippets to find what we're looking for?
Nick12ab is correct in pointing to the manuals - but a lot od the code is not ideal. Think of the Forum as a library - the information is here (usually) but you have to actually fo some real work getting the info that you need (the search function is your friend).

When you get stuck then the Forum members are your friends! :rolleyes:
 
...Think of the Forum as a library ....

When you get stuck then the Forum members are your friends!...
Okay, thank you! :D I sure would have hated to pester the forum with questions when there might have been a link somewhere that pointed to a humongous depository of code people have built up over the years. As I learn more about using these chips, I will surely be asking for help and using the search feature in earnest.

Thanks again.
 

john2051

New Member
Hi there is the 'code snippets' section in the Finished project section. There are some very good routines
and articles.
have fun
regards john
 

westaust55

Moderator
@NoEinstein,

Firstly welcome to the PICAXE forum.

One of the problems is that for many given component types there can be numerous variants with:
- differnt interfaces - There might be analog or i2c or SPI variants (sometime two from the same supplier)
- different control codes for the same function depending upon a controller chip

Some folks do post their code for a particular component or module when they have a working project however that may cover just one of numerous makes and models of a particular type of module.
Unfortunately Not everyone does post their projects or code here when it is new/unique.

Even on the internet a percentage of what is posted irrespective of the microcontroller/microprocessor being used is wrong and will not work. Then you find many making links to the same erroneous information.

unlike programming in some languages such as C where there are global and local variables, for PICAXE BASIC and some other similar chips/languages all variables are global so even a straight forward code example may need some massaging to re-allocate variables and IO pins to be used in your own project.


As already suggested, for some simple things, PICAXE manual 3 is a starting point, then a search through the Finished Projects (and even the active forum area) can find schematics and code routines to help. Then there is always the opportunity to ask the folks on this forum for guidance/help - keeping in mind that there is "more than 1 way to skin a cat" :eek:, so you may get several different suggestions on any given topic.
 

jedynakiewicz

Senior Member
The textbook "Programming and customizing the PICAXE microcontroller" by David Lincoln (2nd edition) published by McGraw Hill is an excellent and most helpful reference guide to many aspects of working with the PICAXE microcontroller. The cover price is 50USD. Whilst generally well-written, the second edition has incorporated M2 chips in Chapter 8 as a "supplement". It is a pity that this information has not been integrated into the text as a whole and that does offer some frustrations in referencing backwards and forwards in the book. Overall, though, 300 pages of mostly useful stuff.
 
...

Even on the internet a percentage of what is posted irrespective of the microcontroller/microprocessor being used is wrong and will not work. Then you find many making links to the same erroneous information....
Thank you, yes, that's why I was hoping that perhaps there was a company-sanctified index of code snippets that had already been tried and proved true. Or a community-based index in which forum members had given ratings and provided comments to various code submissions. At least I know now that such a blessed index does not exist, so I'm left to poke around like everyone else. No use weeping over a Santa Claus that ain't gonna come. :D

Also thanks to Hauton and Jedy for their insights and suggestions, too.
 
Top