simonmonk / pi_starter_kit

Source code for the 'Raspberry Pi Electronics Starter Kit' by 'MonkMakes"
MIT License
20 stars 15 forks source link

03_rgb.py incorrect slider starting position #5

Open stevemason opened 6 years ago

stevemason commented 6 years ago

The LEDs start off at 100%, but the sliders start off at 0 rather than 100. This means that the sliders and LEDs are out of sync until all sliders have been moved. It seemed as though the LEDs were broken to start with. Setting the sliders to 100 when they're created (eg scaleBlue.set(100)) fixes this.

I'm using Python 3.5.3 on Raspbian

I'm enjoying your kit, and troubleshooting has been fun :-)

simonmonk commented 6 years ago

Hi Steve,

All the projects were developed some time ago using python 2. However the kit is long overdue an upgrade and switch to python 3 so thanks for your comments, they are useful. I will probably switch over to GPIO Zero at the same time.

All the best.

Si.

On Sun, 5 Aug 2018, 13:46 Steve Mason, notifications@github.com wrote:

The LEDs start off at 100%, but the sliders start off at 0 rather than

  1. This means that the sliders and LEDs are out of sync until all sliders have been moved. It seemed as though the LEDs were broken to start with. Setting the sliders to 100 when they're created (eg scaleBlue.set(100)) fixes this.

I'm using Python 3.5.3 on Raspbian

I'm enjoying your kit, and troubleshooting has been fun :-)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/simonmonk/pi_starter_kit/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/ACAvUVXVT4x1IIoOrYRtJu0ZCzagfqJMks5uNtssgaJpZM4VvWHT .