Welcome to the forum!! It sounds like everyone gave you great advice. :) I feed my fish 4-5 pellets a day (2 or 3 in the morning and 2 at night). I also fast them Fridays. I give mine a little bit of flakes on Monday the day before a water change because flakes can cloud the water. I also bought some freeze-dried blood worms that I'm going to be giving Thursdays. Sometimes they can bloat from the blood worms so that's why I'll feed them the day before I fast them so if they do bloat, they have time to clear out their systems. Variety is good for bettas.
Oh and if you don't know bloating is another word for constipation or "backing up" of poop. If they do bloat, all you have to do is fast them for a couple days and it should go down. I don't advise peas because sometimes bettas have a hard time digesting them, so if you can, I'd get some daphnia which is a lot easier for them to digest, but it's up to you.
Since bettas are tropical fish, you need a heater unless he's in a room that stays at a constant 76-80*F. Flunctuating temperatures can stress them out so they need a consistent temperature. I have the tetra heater for 2-10G's and I love it. It's $14 at Walmart. It keeps the temperature at 76-78*F.
Also, if you want to keep your tank light on, don't keep it on for longer than 8 hours a day, bettas need a day/night schedule like we do. Some bettas can have a lot of personality, so watch out! :P If you have anymore questions, feel free to ask. :)