2008 Honda Accord Sdn Transmission issues

the automatic transmission is not shifting from 1st to 2nd gear and the lighting of the the automatic transmission ( D) is plumping on and off
and some times the the automatic transmission is working fine but after walking some minutes or hours the problem is coming again

Transmission problems were not that common in this generation, but were very common in the years just prior. It sounds like a problem for a professional to evaluate.