Ok, I’ve been going through this project for ages and ages, getting discouraged and stopping, then getting reinvigorated and starting again, but fearing going too far because I don’t know exactly what to do, and then stopping again. But here I am, ready to give it another shot.
Here we have an ATMEGa 328, along with all the connections I have to each pin (a minor schematic, if you will)
| | (future analogue input)
RGB1 (G)| | Button1
RGB1 (R)| | Button2
RGB1 (B)| | ButtonMain
RGB2 (G)| | Button3
RGB2 (R)| | Button5
5 volts regulated| | Ground
RGB2 (B)| | 5 Volts regulated
RGB3 (G)| |RGB5 (G)
RGB3 (R)| |RGB5 (R)
RGB3 (B)| |RGB5 (B)
RGB4 (G)| |Button4
RGB4 (R)| |RGB4 (B)
All the RGBS are commen negative, and all have a resistor running to ground. The buttons each have a resistor running to ground too. For power, I have two 3 volt batteries, then a switch, then the regulator (L7805), and then the lines go to either side of the chip.
With this setup, there is a total of 21 digital I/O, and in the future there will be 1 analogue input. I have bootloaded the Arduino environment onto the chip, set to use the internal clock of the Atmega 328. (using this http://arduino.cc/en/Tutorial/ArduinoToBreadboard).
I then reset the pins 9 and 10 to be used as digital I/O 20 and 21, (following this: http://arduino.cc/forum/index.php/topic,71572.0.html) and that seemed to work. But now the chip is acting a little funky.
So, that was the intro on what I’m working on. Right now I have inspiration to work on it again, but am worried of advancing and doing something wrong. HOWEVER. I believe that all the electronics are good, and that all my problems are chip-related/programming related. So, does the above board look correct? Would I be able to do what I want if I had that board made? I know the answer would be “Build it and find out”. I have been doing that, bit by bit. I have one board made, with 2 lights and 3 buttons (the main button and two corresponding buttons to the lights), and was testing programming with it. But the chip seems to be acting funky, and not responding to programming correctly (I can go into more details, but funky programming/chip behaviour is not my question right now. I will provide more details if you ask for them though.) Going through the board with a multimeter, I know that all the connections are correct, and should be working.
So do you think that it would be a good idea to go ahead and build 4 boards (or just one), and then worry about fixing the chip/programming bugs later? Or continue going step by step, making sure the programming and electronics work together.