I'm running a project which on the board which is updating from the serial port of my machine. I have therefore disabled the auto-reset (i.e. I've connected the reset through a resistor to the 5v).
However I'd like the ability to perform a reset but ideally from code. i.e. I can call a php function which will then reset by a call to the arundio throguh the serial port.
So the question is, Is there anyway to force a reset on the board (i.e. some function i can call)?
i'm probably using the wrong search terms. I have a lots of posts for hardware resets but not from software.
There is a reason for your search results. There is no true software reset available and there is seldom a valid reason for needing one. Usually it's just a matter of improving the structure of your program to not require a reset. The closest thing to a software reset is utilizing the internal watch-dog timer, however that feature does not have any direct support from the Arduino platform, and one needs to use much caution when using the big dog cause dragons nest there.
I've found that dereferencing a NULL pointer will reset my code. I found this out by accident and didn't want it
I think you will find that it doesn't really 'reset' processor chip, it just jumps to the start of the setup function without resetting all the peripheral I/O and registers. Some have used your method but again usually just 'fixing' the structure of your program can eliminate the need for a 'reset'. Of course there is always the dreaded (but legal in C) goto statement, but that bring the older dragons down upon you for questioning the clans wisdom.