Unscrew battery cover and remove it.
Remove battery and leave it out for a minute more or less.
Plug the battery again and try if your DSi went to factory defaults.
If not, try to access the menu:
On the Nintendo DSi Menu, use the stylus to select the Settings icon.
Select the right arrow to reach the forth page, then select "Format System Memory."
Choose this to erase all saved data, and return the system to the state in which it was purchased.
Go into the settings menu, Parental controls, reset parental controls. Click through the confirmation screens, and then it will give you a confirmation code and ask you to call Nintendo.
Instead of calling Nintendo, go to this form and enter the code. Even though it was originally written for the Wii, marcan's reset code generator will give you a valid code that you can enter into your DSi to remove the parental control; I had to do this for a DSi I bought on eBay. Good luck!
Wii Parental Control password reset tool
recomendado funciona wii y dsi provado