Have you read this thread?
I guess when you flashed your new code, you triggered a firmware update that will take its time, and if you got impatient (not knowing of this), you might have interrupted the update causing yourself some trouble.
But relax, this usually can be fixed.
One thing you should definetly do is to put your Photon in Safe Mode an flash a very basic program like "blink a led" and let it finish its firmware update.
If this doesn't work anymore since you've upset the device too much, you might need CLI and dfu-util to get things sorted again.
Not a big deal, and useful to have these tools anyhow.