There is no strategy for slots. American slots are entirely random. They could pay the jackpot five times in a row, or not pay it for five years in a row. So you did not necessarily do anything wrong trying to get past $38. You had no way of knowing if it would pay some more or not.
The only thing I would question (other than the merits of playing penny slots which usually offer some horrible odds), is if you were playing for maximum credits. If you were able to play for two hours for $10, then I find it hard to believe you were playing max lines and max credits. You really need to do that, which turns the penny slot into something that can cost several dollars per spin. If you can't afford that look for a quarter machine that takes 1-3 credits per spin and only has one line. This way it will cost no more than 50c or 75c per spin.
If you don't bet maximum credits you are often exempt from winning the true jackpot and your odds are even worse as a result.
Keep in mind that slot machines are like scratch cards. You might get lucky, but the odds are very much against you.
Even though I am a pretty good winning poker player, I still like to pop a few dollars into a slot now and then. I know the odds are against me and that the EV is very low, but still it's fun. I don't mind paying a few dollars for the entertainment of seeing if I can win a million dollars. Last time I was in Vegas someone won $12m at the Wynn in a slot. Last time my friend was in Vegas he put $20 in a machine and won $6,000.
I know I can play single deck black jack for hours and have better odds, but I am not going to become a millionaire that way. That's why slots are fun, just don't play them expecting to be a millionaire by the time you are done!