Ejemplo n.º 1
Archivo: radio.py Proyecto: akx/dot3k
import sys


import dothat.touch as touch
import dothat.lcd as lcd
import dothat.backlight as backlight
from dot3k.menu import Menu
from plugins.utils import Backlight, Contrast
from plugins.volume import Volume
from plugins.clock import Clock
from plugins.radio import Radio
from plugins.graph import GraphCPU, GraphTemp
import time


# We want to use clock both as an option
# and as the idle plugin
clock = Clock(backlight)

Using a set of nested dictionaries you can describe
the menu you want to display on dot3k.

A nested dictionary describes a submenu.
An instance of a plugin class ( derived from MenuOption ) can be used for things like settings, radio, etc
A function name will call that function.
menu = Menu({
        'Clock': clock,
# from other rooms. Depending on free time, I might maintain this file or not.

Press CTRL+C to exit.

import Adafruit_DHT
import dothat.touch as j
import dothat.lcd as l
import dothat.backlight as b
import signal
import socket
import time


dtemp=float(21.00)  # temperature that i want to be in the room
rtemp=float(20.00)  # read temperature from sensor
heatc=0.0    # count to light or dim the vertical leds
heat="OFF" # default heating
room="Bedroom: "

def status_heating():
	s = socket.socket()
	return str(msg)