Python Forum
beginner programming LED light - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: beginner programming LED light (/thread-10973.html)



beginner programming LED light - rbowler - Jun-15-2018

Hello.

I am an older student returning to school and a research trainee at a science lab. I am conducting an experiment where I have to program a small light to go on and off at random intervals in the span of 1 hour. I have absolutely no coding experience and very limited technical knowledge. So I have the following elementary questions about Python before I download it:

1) Does Python have a physical page where I would type my code into? For example, if I need to type a research paper, I would open Word and physically type letters into a page on Word.

2) Are there sample scripts I can use as a template for programming lights to go on and off?

3) Can you recommend Python compatible building materials - I have seen information about using arduino and Raspberry Pi boards, and LED bulbs?

Thanks.


RE: beginner programming LED light - Larz60+ - Jun-15-2018

1. You can use any 'plain' editor to write python code, word will not work as it surrounds text with formatting statements, that are saved, even though not seen in the text. Notepad, Notepad++ are examples of simple editors, then there's the 'IDE' which offers all sorts of code enhancements such as syntax checkers, auto-completion, etc. Most of these are free, and you can see what's available by googling "python IDE's".

2. There are many scripts like this available for all sorts of MCU's look for names like blink.py example: https://gist.github.com/sophiekovalevsky/8891122

3. The raspberry pi should be able to drive LED's ddirectly from the GPIO, but add a current limiting resistor so as not to burn out the chip. Example: https://www.youtube.com/watch?v=lzIDqWp2mdQ


RE: beginner programming LED light - rbowler - Jun-16-2018

Okay - thanks for the detailed info.