Saving photos onto micro sd card from a ttl serial camera

Hello, I’s pretty new to arduino, and tried a project to save photos from a camera module onto an sd card i found online (Saving Images on an SD Card | Robotic Controls) and added a momentary push button to take a photo, but cannot get it to work. The code uploaded successfully, but every time I try to take a photo, the arduino uno turns off. I also used a different sd breakout board than the turorial,(SparkFun Level Shifting microSD Breakout - DEV-13743 - SparkFun Electronics) and assumed that vin=3v and clk=sck. Did I adjust the code incorrectly to include a push button or do i have something wrong with my wiring?

camera1.ino (4.55 KB)