Arduino Mega 2560 pin staying HIGH [solved]

I just got this from ebay:

Arduino-Compatible Mega 2560 

comes with

- ATmega2560--16AU micro controller (MCU)
- ATmega8U2-MU USB-to-Serial controller

Key Features:

ATmega2560 Microcontroller
Bootloader installed, ready for sketches (programs) uploading from Arduino software (IDE)
Flash Memory 256 KB
Free USB Cable Included

Microcontroller ATmega2560
Operating Voltage   5V
Input Voltage (recommended) 7-12V
Input Voltage (limits)  6-20V
Digital I/O Pins    54 (of which 14 provide PWM output)
Analog Input Pins   16
DC Current per I/O Pin  40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory    256 KB of which 8 KB used by bootloader
SRAM    8 KB
Clock Speed 16 MHz

The problem is, it is having trouble executing simple blink command, here is what i uploaded into it:

void setup() {
  pinMode(22, OUTPUT);
  pinMode(23, OUTPUT);
  pinMode(24, OUTPUT);
  pinMode(25, OUTPUT);
  pinMode(26, OUTPUT);
  pinMode(27, OUTPUT);
  pinMode(28, OUTPUT);
void loop(){
  digitalWrite(22, HIGH);
  digitalWrite(22, LOW);
  digitalWrite(23, HIGH);
  digitalWrite(23, LOW);
  digitalWrite(24, HIGH);
  digitalWrite(24, LOW);
  digitalWrite(25, HIGH);
  digitalWrite(25, LOW);
  digitalWrite(26, HIGH);
  digitalWrite(26, LOW);
  digitalWrite(27, HIGH);
  digitalWrite(27, LOW);
  digitalWrite(28, HIGH);
  digitalWrite(28, LOW);

this is just to test the pins, because PIN 22 and 23 are staying HIGH, even though they were told to go LOW by the program. Did I buy a crappy/broken board?

Actual image: ![]($(KGrHqV,!o0E9c7yTkegBPq0V,,ocw~~60_57.JPG)

PIN 22 and 23 are staying HIGH

What about the other pins?


I tested about 20 pins, and just those 2 are acting up. I have a project coming up that is going to use a total of 30 pins atleast (for output only)

AFAIK those two pins have no other functions that may be getting in the way. Do you have anything different connected to those two pins? If not maybe the board is faulty.

Workaround: Use two other pins :)


Solved my own problem. If you look at the pic of the board, I put the LED pos wires in the top 2 pinholes of the right most 2 columns. Those rails are constant HIGH. PIN 22 and 23 start at the second row down.

We can scratch this off as PICNIA... (Problem In Chair, Not In Arduino) aka Noob mistake.