Exemplo n.º 1
0
    def __init__(self):
        is_debug = self._debug_detect()
        if not is_debug:
            import RPi.GPIO as GPIO
            GPIO.setwarnings(False)
            GPIO.setmode(GPIO.BCM)

        buttons = Buttons_HW(is_debug)
        buttons.listen_buttons(self._buttons_callback)

        self._game_select = GameSelect()
        self._game_select.set_callback(self._change_menu_mode)

        self._equations = Equations()
        self._equations.set_callback(self._change_menu_mode)

        self._display = Display_LCD(is_debug, self._draw)

        if is_debug:
            self._draw(self._display.debug_draw())
            self._display.debug_show()
Exemplo n.º 2
0
from equations import Equations
from random import randint
import subprocess, os, platform, sys

user_input = ''
args = []
print("Loading ...")
user_equation = Equations()

def printOptions():
    print("Please pass arguments a number/symbol at a time")
    print("Acceptable inputs are:")
    print("Any one digit number (0-9)")
    print("Addition, Subtraction, Multiplication and Division symbols (+, -, *, /)")
    print("If you would like to input numbers with multiple digits, place them one after another")
    print("Input 's' to have the program solve the inputted function")
    print("Input 'r' to reset the equation")
    print("Input 'd' to see a simple demo of the program")
    print("Input 'e' to solve a random equation")
    print("Input 'p' to print out your current list of arguments")
    print("Input 'u' to remove the last item added to the arguments")
    print("Input 'q' to quit the program")
    print("Input 'c' to clear the terminal and list options again")


symbol_inputs = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '-', '*', '/',]

printOptions()

while True:
    user_input = input("Enter Symbol: ")
Exemplo n.º 3
0
def main():
    obj = Equations()
    while obj.runloop:
        obj.loop()