Controlling LEDs through computer
- Lucy Emmett
- May 7, 2018
- 1 min read
This was my first was my first project for making interactions on the computer to affect the Auriga. So, I decided to use python with the libraries Tkinter and pyserial, to send a RGB value inputted by the user to light an led that colour on the board. I only used the onboard LEDs for this but it could easily be manipulated to an LED strip.
I thought this was a good first project because it was simple enough to not get too stuck, but had enough coolness/complexity to give me the motivation to do it. I would recommend this to other beginners.
This is the code uploaded to the arduino/auriga:

This is the code run on the computer:

Note: One issue I do have is that some places it had to have a delay(10), and I don’t know why. I have tried using Serial.flush() instead but in some cases, it doesn’t fix it. An explanation would be great :)
If you have any problems understanding my code, just comment down below! I am happy to help as this took me a while to get my head around how to send the data.
Comments