I changed CLKPR and now can't connects to the Pro Mini


I played with CLKPR in order to measure actual current consumption in different modes (Arduino Pro Mini 16Mhz 5V) And I accidentally load tis code, which left my clock rate at 2 Mhz. Now I can’t connect to the Arduino, device is not recognized.

Any advice how to connects to the board again and change the code?

The code:

void setup() {
//  Setting prescaler
   CLKPR = (1 << CLKPCE); // enable a change to CLKPR
   CLKPR = 8; // set the CLKDIV to 8 (8=0100b = 16MHz/ 8 = 2MHz)

void loop()

Try the solution here: http://stackoverflow.com/questions/5290428/how-to-reset-an-arduino-board

In the worst case, follow instructions to reinstall the boot loader (which clears out the existing sketch)

@SergioUno , You really should have read How to use this forum before posting. (Especially item #7.)

ie Your code and any error messages should always be placed between [code]code tags[/code]. Posting it inline as you have done makes it much harder to read or copy and paste for diagnosis, and often also corrupts the code with italics or smilies.

It's still not too late to edit your post and do this. You'll make potential helpers much happier. :)

Nick Gammon's tutorial and code may also be useful.