GithubHelp home page GithubHelp logo

drtobe / hector9000 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from h3c702/hector9000

0.0 3.0 0.0 359 KB

Fancy barbot with lots of needless features and ...of course... WiFi and a bunch of blinky LEDs

Home Page: https://hackaday.io/project/161585-hector-9000

License: MIT License

Python 99.91% Shell 0.09%

hector9000's Introduction

HECTOR 9000

Minimal Requirements

- Python 3
- Kivy 
- RaspberryPi 3

Install on RaspberryPi

First of all you have to install Python 3 and Kivy on your Raspberry Pi.

For this there is a HowTo on the Kivy Homepage :

https://kivy.org/doc/stable/installation/installation-rpi.html

After you have installed Python and Kivy you can get the sources by using Git

git clone https://github.com/H3c702/Hector9000.git

You can install all the requirements listed in the file requirements.txt by using pip (use pip3 if pip uses Python 2)

pip3 install -r requirements.txt

Add Drinks

To add a new Drink you have to modify the drinks.py file and add a new item into the array

{
    "name": "NAME OF DRINK",
    "recipe": [
        ("INGREDIENT1", AMOUNT1),
        ("INGREDIENT2", AMOUNT2)
    ]	
}

All strings in UPPERCASE are placeholders, all lowercase strings have to be used literally in the definition. The INGREDIENTx names are not cleartext but are identifiers referencing into the ingredients list below in the same file. The AMOUNTx values are numerical values of the corresponding ingredient's amount in grams.

At the moment there are only some ingredients but feel free to put in some new.

# "NAME":("NICENAME", ISALCOHOLIC)
ingredients = {
	"gin": ("Gin", True),
	"rum": ("Rum", True),
	"vodka": ("Vodka", True),
	"tequila": ("Tequila", True),
	"tonic": ("Tonic Water", False),
	"coke": ("Coke", False),
	"oj": ("Orange Juice", False),
	"gren": ("Grenadine", False),
	"mmix": ("Margarita Mix", True)

Here each ingredient identifier is mapped into a tuple containing the NICENAME used in the UI and a flag that tells whether the ingredient contains alcohol. A future extension might allow multi-language UIs.

Assigning valves

So because Hector has twelve valve channels you have 12 valves predefined (in servo_config.json and HectorHardware.py) to manage the mapping of each ingredient to a valve. Therefore you have to edit the servo_config.json file and set the value field to the ingredient identifier you put into the channel. Only drinks that have all the required ingredients set in the servo_config.json will be shown in the menu.

Example:

"pump_3": {
	"name": "Pump 3",
	"channel": 2,
	"value": "oj"
},

Development on non-Hector hardware :

If you are not on the "real" Hector hardware you can set the var devEnvironment in Hectorhardware.py to True:

devEnvironment = True

The HectorHardware library will then emulate Hector's hardware to allow testing of the UI, for example.

If you are in production or are developing directly on Hector's Pi you should set this var to False.

hector9000's People

Contributors

cadm1um avatar devtown avatar drtobe avatar kater--s avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.