Python Forum
Some random (and probably dumb) questions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some random (and probably dumb) questions
#1
Hello,

I've just gotten into learning more about both linux and python, mostly via a raspberry pi. Ive got some questions that I don't really know how to word for googling. I thought I would post here and just sort of talk and see if anyone wanted to comment.

I am currently mostly wanting to do some home automation tasks with the pi and python.

1. If I want to use the pi to say, control some lights, act as a thermostat and turn a fan off and on, would this generally be best done with a separate program for each running simultaneously? Or is there a way to do this all in one giant program? I've read some about threading, but currently its above my head.

2. If I write a program to for example read a temp probe and return the value as x and have it running constantly in the background, is there a way I can reference my variable x in separate programs? For example could I have a script running that turns an LED off and on depending on the value of x, but in another script have x printed to the screen when condition z happens or something? I really don't know how to word this one to search for it.

3. As I understand programs are executed from top to bottom. If I have a condition that lets say I want to make an LED flash when true, how is this normally done?
Reply


Messages In This Thread
Some random (and probably dumb) questions - by Andy1845c - Mar-12-2018, 12:12 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020