idea using flask or webserver is that i can get a better touch screen lets say put android tablet instead of touch screen for raspberry pi ( i haven't used any raspberry pi touch screen yet so have fear touch won't be good compare to phone / tablet ) so raspberry pi will be running behind machine and server url can be opened in browser on android tablet which will be front above taps ( little fancy stuff )paddyg wrote: ↑Sat Nov 24, 2018 9:02 pmMatt Richardson did a good Fask intro here http://mattrichardson.com/Raspberry-Pi-Flask/ and I've seen similar things with code red that you will be able to find with a bit of googling. I have to warn you that if you are new to programming then the asynchronous client/server concepts will be pretty tricky. I would have thought your application would require a human close to the action (holding the glass) and didn't lend itself to a web interface, why do you want to use it?
however its not important if tkinter can give nice looking GUI i think i can use it.
updating / calibrating flow meter measure pour /size
going forward i have created SQlite3 database where i want to store my different measure strings /variables such as MEASURE_SMALL = 60 so instead grabbing measure data from python file i would able to get it from SQlite db. but i could not figure out how can fill MEASURE_SMALL ="get data from SQlite"
which i am able to with python script with print
Code: Select all
import sqlite3 conn = sqlite3.connect('wine.db') c = conn.cursor() def get_sensor(): c.execute("SELECT value FROM data") print(c.fetchall()) get_sensor() conn.commit()
Code: Select all
>>> %Run sql.py [(60.0,)]