You did everything absolutely right, and you could have been absolutely dead

No more than 10 or 15 seconds had elapsed since getting airborne. We had just passed the departure end of Runway 07, and were climbing through about 100 ft. AGL. I was just about to make the turn to 050 then bring the gear up, when the plane made a violent lurch to the left, and we were suddenly descending very quickly despite the airspeed and nose up pitch.

What to do when the panel goes dark

Just after Hollister had passed under the left wing, the transponder flashed an error message, and went from their assigned squawk code to 1200. “Huh?” says the instructor, “What’s up with that?” The instructor tried to enter the assigned squawk code a couple more times, with the same result. That was exactly when the wheels fell off the cart, electrically speaking.