This repository contains code for the 24i bartender (both pi & application). The app
folder contains the React Native frontend app and the pi
folder contains all code handling the actual hardware control.
Retrieves a list of all pumps and drinks attached to it.
Response example
[
{
"id": 1,
"drink": "vodka"
},
{
"id": 2,
"drink": "UNKNOWN"
},
{
"id": 3,
"drink": "UNKNOWN"
},
{
"id": 4,
"drink": "UNKNOWN"
},
{
"id": 5,
"drink": "UNKNOWN"
},
{
"id": 6,
"drink": "UNKNOWN"
},
]
Allows to attach a drink to a pump.
Request body example
{
"id": 2,
"drink": "gin"
}
Response 400 error example
{
"message": "This pump can not be set"
}
Response 200 example
{
"message": "Pump updated"
}
Retrieves a list of recipes available on the server
Response 200 example
[
{
"id": 1,
"name": "moscow mule"
}
]
Request body example
{
"name": "gin tonic",
"parts": [
{
"drink": "gin",
"percentage": 50
},
{
"drink": "tonic",
"percentageg": 50
}
]
}
Response 200 example
{
"message": "Recipe created"
}
Starts pouring a given drink
Request body example
{
"amount": 330,
"parts": [
{
"drink": "gin",
"percentage": 50
},
{
"drink": "tonic",
"percentageg": 50
}
]
}
Response 400 example
{
"message": "Non compatible drink"
}
Response 200 example
{
"message": "Drink pour started"
}
Pin | Description |
---|---|
17 | Pump 1 |
27 | Pump 2 |
22 | Pump 3 |
23 | Pump 4 |
24 | Pump 5 |
25 | Pump 6 |
Pin | Description |
---|---|
16 | Red |
20 | Green |
21 | Blue |