From Picaxe to Arduino, it's not hard.
When I joined LMR I had just written my first picaxe program.The picaxe was easy to learn since I knew basic and the manuals gave you all the information you needed. As my projects became more complex I started running into limitations with the picaxe.
After 16 months I have finally crossed over to Arduino. It was easier than I thought, the biggest problem I found was that all the commands were not in one neat package like the picaxe manuals (Manual 2 in particular).
After some Googling I found the "Arduino Programming Notebook" by Brian W. Evans. Although hardly an all inclusive guide it is a nice simple guide on the programming structure and common commands used. Perfect for an absolute begginer! Along with the examples built into the Arduino Enviroment I soon understood the basics. The "C" language used by the Arduino is easy to learn and not all that different from basic.
Four basic parts to any Arduino program.
1. At the very start you need to include any tabs or libraries you are using. Where a basic program has everything in the one file, C programs can be made of multiple files.
2. Declare variables. While the picaxe has so many bytes which can be paired into words, C has bytes, integers (words), long variables (32 bit) and float variables (32 bit with decimal point). Unlike the picaxe, negative numbers can be stored in your variables so where a picaxe word would store a number between 0 and 65535, an Arduino integer will store numbers from -32768 to 32767.
3. The setup function is a necessary part of an Arduino program, It runs at the very start and is usually used to define pins as inputs or outputs, initialize servos etc. Even if your program doesn't need this function it still must be present.
4. The loop function is where your main program is written.
Sub routines are now called functions and can be a bit confusing at first because they can pass results back. Because I am use to basic I found it easier to just declare all my variables at the start of the program so they are global (can be accessed from any part of the program) and not pass any information.
Once I could make a LED blink and use PWM to dim it or vary the speed of a small motor I then found the reference page on the Arduino home site made more sense an became useful. With the odd Google search when I was stuck it wasn't long before I had translated "Mr. General.BAS" for use with an Arduino Nano plugged into Mr. General's breadboard.
Arduino users will have to forgive my poor program structure. This is partly because the program was an almost direct translation of a picaxe basic program and mostly because I was learning as I went. Those familar with the example code for "Tune" will see I am a plagiarist and copied the example with almost no change.
It was while learning about the tune command that I discovered that the Arduino program enviroment had a "Tab" feature. Each tab is saved as a seperate file and must be included into the main program. By defining my IO pins in one tab and constants in another it makes my code neater and easier to adjust.
I still have a lot to learn and still like picaxe for many things such as it's commands for using IR leds and receivers. For those picaxe programmers wanting to learn Arduino I found the Arduino Nano plugged into a breadboard was a great beginners platform at a good price.