School project: Powering lights

This is the place for queries that don't fit in any of the other categories.

School project: Powering lights

Postby Winter » Tue Oct 08, 2013 4:55 pm

My problem
I'm doing a school project where I have to create a program that will power and light up three LED lights, where a different LED lights up depending on what key you press.
The problem here is that I haven't learned anything in my programming class on how to have python transfer voltages from the pc to the LED lights at will, nor have I learned to
control which light I will power up. I would appreciate any help on how to start this project and at least understand what I'll have to do. Thanks for any help you output.
- Winter
Last edited by Mekire on Wed Oct 09, 2013 12:52 am, edited 1 time in total.
Reason: First post lock
Posts: 1
Joined: Tue Oct 08, 2013 4:24 pm

Re: School project: Powering lights

Postby Marbelous » Tue Oct 08, 2013 6:25 pm

Are you sure the assignment isn't supposed to use virtual LEDs through a GUI like Tkinter??? Python has no way to control anything in the real world unless you connect hardware of some type. In a pinch your PC's serial COM port can be pressed into service to light 1 or 2 LEDs programatically but you'll still need to expose the COM port hardware and that's not a trivial beginner task. Much easier would be a DAQ card that has Python drivers and digital I/O but they cost money. You need to ask what hardware you're expected to do this project with and get back to us...

EDIT: You're not by any chance using a Raspberry Pi are you?? Then it's easy!
User avatar
Posts: 401
Joined: Fri May 31, 2013 8:12 pm

Re: School project: Powering lights

Postby micseydel » Tue Oct 08, 2013 8:02 pm

I've controlled LEDs in Python using the serial module and an Arduino, so it's entirely doable, but you'll have to be much more specific about what you have available to you.
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 4 guests