I got my Arduino yesterday (and it's a lot of fun)! I just have a (silly) question..
Is it okay to have a led running across a High and a Low output? And is the Low output the same as ground? I am just playing around with a small matrix, but without really any IC's to use - so I can't connect all the rows (of the matrix) to ground, since then I would lit up the whole column and not a single led.
If the leds have a resitor in series with each of them (minimum 220R for red, green and yellow types, 100R for blue) then it should be OK. Without a resistor you would be driving too much current from one pin into another pin. The thing to remember is that any given pin should be sourcing/sinking at most 20ma...
Remember also that the pins can source enough current for one bright led or two dimmish ones, depending on the resitor chosen. So when you are wiring things up, don't ask the Atmega chip to provide enough current to drive more than that. For multiple leds on one pin, use a transistor driver.
(I have to say though, I have seen students do the complete opposite of the advice above, and no one seems to have fried an Arduino yet, the Atmega chip is incredibly robust.)
No, the jumper is correctly selected. I have tried with the same code in another board, this one with a ATMEGA8 and it works, but with the ATMEGA168, there is no way. I've also selected for the IDE de correct version of the chip before programing it!
I've buy it at PCB Europe, and I've the same problem with this two arduinos. The old one based on ATMEGA8 works perfect...
Any idea?
This is the code I'm using:
///////////
void setup()
{
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
Thank you very much, it works! But the problem now is that I've to put that resistor every time I start the arduino with the external power supply, and I need that port for the serial comunication. Is there any other solution?
The RX pin is connected to the TX of another arduino, and the TX to the RX, so we can comunicate both throught serial comunication. If we can not use the RX pin, we can change the configuration to make the serial comunication with other pins.
But it is possible to make the serial comunication with the 10k resistor and the RX pin conected to the other arduino?
Why doesn't my sketch start when I power up or reset the Arduino board?
Most likely because you are sending serial data to the board when it firsts turns on. During the first few seconds, the bootloader (a program pre-burned onto the chip on the board) listens for the computer to send it a new sketch to be uploaded to the board. After a few seconds without communication, the bootloader will time out and start the sketch that's already on the board. If you continue to send data to the bootloader, it will never time out and your sketch will never start. You'll either need to find a way to stop serial data from arriving for the first few seconds when the board powers (e.g. by enabling the chip that sends the data from within your setup() function) or burn your sketch onto the board with an external programmer, replacing the bootloader.