Raphael Kit Raspberry Pi 1.1.3 LED Bar Graph Python script

I think I might have found an issue with the Python script for Raphael Kit 1.1.3.

After wiring the schematic (double and triple checked), when running the script, the loop seems to work backwards. When LED is supposed to be off it is on, and when it is supposed to be on, it is off.

Here is the sequence:

  • Run script
  • ALL LEDs on
  • In sequence 1, 3, 5, 7, and 9 will turn off and back on
  • In sequence 2, 4, 6, 8, and 10 will turn off and back on
  • In sequence 1 - 10 will turn off and back on

The clue was in the def setup(): where it said:

Set all ledPins to high(+3.3V) to off led

The GPIO.Output is set to GPIO.output(i, GPIO.LOW) # Set all ledPins to high(+3.3V) to off led

But, another clue was referencing 1.1.1 where in its def setup() it showed this:

Set LedPin’s mode to output,and initial level to High(3.3v)

GPIO.setup(LedPin, GPIO.OUT, initial=GPIO.HIGH)

I was able to modify the script to perform as it seems it should where all LEDs start as off and they are turned on and back off in sequence. I changed all GPIO.LOW entries to GPIO.HIGH in the script and it runs as expected.

I am curious whether I was right or wrong in this.

Give us a video or image of the problem you are experiencing, so that we can analyze the problem.
The Python script for 1.1.3 is in the order you described:
Run the script
All LEDs are on
Sequence 1, 3, 5, 7, and 9 will turn off and turn back on
Sequence 2, 4, 6, 8 and 10 will turn off and on again
Sequence 1 - 10 will turn off and on again
If you have modified the code and found any problems, please provide us with the code you have run, so that we can analyze and solve the problems.