I'm building a simple EEPROM programmer that allows me to set individual bytes. The idea is to be able to enter an address on the serial monitor, then the data. I managed to cobble a sketch together which does not work properly. The sketch should take any number entered and turn it into a byte, then set 8 digital outputs (pin 2-9) with the individual bits. My only worry is that the sketch does set the first pin (pin 2) but the rest of them. I think the for loop is executed only once. What am I doing wrong?

BTW digitalWrite () treats any non-zero value as HIGH, (LOW is the same as 0 is the same as false), so you often don't needto convert values specifically to HIGH or LOW - just pass directly to digitalWrite.

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Thank you, that's a very good point! I'm having trouble with the control flow again. This time a for loop gets executed continuously (as it's supposed to) but cannot make it run only once. Tried the break statement with no success.

I appreciate your help and am grateful but I feel a but uncomfortable with your schooling.

OK. I'll knock it off. The only reason I harp on this issue is that I feel that lining up the { and }, and doing consistent indenting, reveals a lot of issues with out-of-order execution and "why isn't his happening here" types of problems.

I suspect that that is why your print statements don't seem to be executed, but because nothing lines up, the only way for me to know that is to copy and paste your code into the IDE, put each { on a new line, and use Tools + Auto Format.