I pulled this off of some site when I needed to borrow my son's iPad, that I gave him, for a work project. Since he is particularly fond of his mini, it had been a while since he had used the larger one and subsequently forgot the lock code.
So, here is how to do a hard reset to factory conditions without the lock code.
In my circumstance, I connected it to a computer that had never sync'd with that pad so it worked like a charm.
Reset an iPad Never Synced with iTunes
Section 2 - Reset an iPad Never Synced with iTunes: Disconnect the iPad from the computer, but leave the USB cable connected to the computer.
Hold down the "Sleep/Wake" button for several seconds until a red slider appears. Move your finger across the slider to turn the iPad off.
Connect the iPad to the computer while holding down the "Home" button to turn on the iPad.
Release the "Home" button when you see a message that says, "Connect to iTunes."
Launch iTunes. iTunes will alert you that it detects a device in Recovery Mode.
Click "OK" and click "Restore" to reset the iPad.