I've been working pretty solidly on my RPi project and have managed to get my way through the majority of things with the sole exception of putting the two components together. The project is to have a sensor night light that will come on when movement is detected around the bed to avoid shin kicks etc when doing a 3am bio break. The bonus being that it won't be too harsh on the eyes and shouldn't wake my partner up.
I've got the sensor working.
I've got the LED strip working (using this tutorial and much other research)
My issue is that the colour of the LED's is reverse to what is being set.
my wiring is as follows
Code: Select all
PhysicalPin9 - Ground GPIO17 - Red LED GPIO27 - Green LED GPIO22 - Blue LED All feed to bread board currently where they are connected to the middle pin of a MOSFET (LM3940IT to be exact). The left pin of the MOSFET connect to the strip with their appropriately labelled wire. The +ve terminal of the LED is connected to the breadboard along with +ve terminal for the external power There are grounds running from the right most pin of the MOSFETS to the ground on the bread board and then back to the Pi (see physicalpin9 comment before).
I'm not overly worried as I can work with this knowing that this is happening, just curious as to why?