Query about Arduino Nano

Hi. I'm only just beginning to to learn about Arduino and I have a very simple question.

Once I have built and tested my sketch on my ArduinoMega can I then transfer the proven code onto an ArduinoNano and keep it as a dedicated microprocessor for my projects?

Is that the way it's meant to happen? Compile the sketch on the main Arduino board and then write it to a Nano board for a more permanent use?

These may seem like a simple thing to you experts but I am a complete and total novice to this field.

That's what is commonly done. We (well, some people - I go straight to pro minis, if I can even be bothered to use a '328 instead of one of the 't841/t1634 boards I've got piles of) develop on an Uno (or other full-sized board), and then put the same code onto a small, cheap pro mini or nano clone.

However, you're starting from a Mega, not an Uno. Since these boards use a different processor (atmega2560 with more pins than you can shake a stick at) from the Nano/Pro Mini/Uno (which use the '328p, with what, 25 usable GPIO lines?), you'll need to change the pin numbers, and make sure that you're not relying on peripherals that are not present on the '328p. I think there are small outline mega clones analogous to the mini available on ebay.

Pro Mini vs Nano - These both have very similar form factor. The nano has on-board USB to serial converter on board, and a USB connector at the end. The pro mini has no on-board usb to serial converter, and has a 6-pin FTDI header for serial. Thus, the pro mini requires an external USB-serial adapter. However, to accomodate the usb serial adapter, the nano needs parts on the underside of the board, so you can't mount it flush to a surface (and doing what's shown in my avatar, and sold in my tindie store, is out of the question!), and the USB serial adapter wastes a small amount of power, making the nano less power efficient. I prefer using pro minis, and I just have a drawer full of serial adapters if I need them (I had boards made and fabbed a whole crapload)

Many thanks for that reply DrAzzy. It was very informative indeed.

Would I be better then putting the MEGA aside and buying an UNO for ease of programming?

Bear in mind that my projects are not large ones involving PWM or motor control, but only lighting effects and LED sequencing.

Thanks agian for your help.

Alan_B:
Would I be better then putting the MEGA aside and buying an UNO for ease of programming?

It would make your life easier to develop on the Uno, but not a necessity.

If your code doesn't use the hard ware differences, it doesn't matter. For example, use Digital Pins 0-13. Analog pins 0-5. No extra serial ports. Etc.

Many thanks for your responses guys.

Like I said, I am a complete novice at this stuff.

I appreciate your help.