Things used in this project

Hardware components:
R8326274 01
Raspberry Pi 2 Model B
×1
water pump
×1
Relay (generic)
8 channel
×1
pipe
×1
Adafruit touchscreen
×1
sd card
×1
Software apps and online services:
raspbian modified
putty
win 32 disk imager

Code

Code snippet #4Plain text
<p>#!/bin/bash<br> 
while true; do
  choice="$(zenity --width=400 --height=300 --list --column "" --title="Cocktail" \
  "cocktail" \
  "soft" \
   "shooter" \
   "cow boy")"
  
  echo $choice
 
  case "${choice}" in
    "cocktail" )
      while true; do
        choice="$(zenity --width=400 --height=300 --list --column "" --title="test" \
        "whisky coca" \
        "wodka orange" \
		"ricard eau" \
		"tequila orange"\
		"Gin orange")"
 
		echo $choice
		
        case "${choice}" in
          "whisky coca" )
            
  gpio mode 2 out
        sleep 3
        gpio mode 2 input \</p><p>        gpio mode 0 out
       sleep 4
       gpio mode 0 input
         </p><p>			break
          ;;
          "wodka orange" )
             gpio mode 3 out
        sleep 2
        gpio mode 3 input \</p><p>        gpio mode 7 out
       sleep 4
       gpio mode 7 input
         
			break
          ;;
		  "ricard eau" )
             gpio mode 24 out
        sleep 3
        gpio mode 24 input \</p><p>        gpio mode 25 out
       sleep 3
       gpio mode 25 input
         
			break
          ;;
		    
          "tequila orange" )
             gpio mode 22 out
        sleep 3
        gpio mode 22 input \</p><p>        gpio mode 7 out
       sleep 3
       gpio mode 7 input
         
			break
          ;;
		   "Gin orange" )
            gpio mode 23 out
        sleep 2
        gpio mode 23 input \</p><p>        gpio mode 7 out
       sleep 4
       gpio mode 7 input
         
			break
       ;;
		  *)
			echo "bye"
			break
		  ;;
        esac
      done
     ;;
	 "soft" )
		while true; do
        choice="$(zenity --width=400 --height=300 --list --column "" --title="test" \
        "orange" \
		"coca" \
        "eau")"
		
		echo $choice
 
        case "${choice}" in
          "orange" )
             gpio mode 7 out
       sleep 6
       gpio mode 7 input
			break
          ;;
          "coca" )
             gpio mode 0 out
       sleep 6
       gpio mode 0 input
			break
          ;;
		  
		   "eau" )
             gpio mode 25 out
       sleep 6
       gpio mode 25 input
			break
          ;;
		  *)
			echo "bye"
			break
		  ;;
		  esac
		  done
	 ;;
	
    
 "shooter" )
		while true; do
        choice="$(zenity --width=400 --height=300 --list --column "" --title="test" \
        "whisky" \
		"wodka" \
		"tequila" \
		"gin" \
        "TGV")" 
		
		echo $choice
 
        case "${choice}" in
          "whisky" )
             gpio mode 2 out
       sleep 2
       gpio mode 2 input
			break
          ;;
          "wodka" )
             gpio mode 3 out
       sleep 2
       gpio mode 3 input
			break
          ;;
		  "tequila" )
             gpio mode 22 out
       sleep 2
       gpio mode 22 input
			break
          ;;
		  "gin" )
             gpio mode 23 out
       sleep 2
       gpio mode 23 input
			break
          ;;
		  "TGV" )
               gpio mode 22 out
        sleep 1
        gpio mode 22 input \</p><p>        gpio mode 23 out
       sleep 1
       gpio mode 23 input \
	   
	   gpio mode 3 out
        sleep 1
        gpio mode 3 input 
			break
          ;;
		  *)
			echo "bye"
			break
		  ;;
		  esac
		  done
	 ;;</p><p> "cow boy" )
		while true; do
        choice="$(zenity --width=400 --height=300 --list --column "" --title="test" \
        "ricard pierre" \
		"whisky coca" \
		"wodka orange" \
		"gin orange" \
		"tequila orange" \
        "cimetière")"
		
		echo $choice
 
        case "${choice}" in
          "ricard pierre" )
             gpio mode 24 out
        sleep 4
        gpio mode 24 input \</p><p>        gpio mode 25 out
       sleep 5
       gpio mode 25 input
			break
          ;;
          "whisky coca" )
            gpio mode 2 out
        sleep 3
        gpio mode 2 input \</p><p>        gpio mode 0 out
       sleep 6
       gpio mode 0 input
			break
          ;;
		     "wodka orange" )
             gpio mode 3 out
        sleep 3
        gpio mode 3 input \</p><p>        gpio mode 7 out
       sleep 6
       gpio mode 7 input
			break
          ;;
		     "gin orange" )
             gpio mode 23 out
        sleep 3
        gpio mode 23 input \</p><p>        gpio mode 7 out
       sleep 6
       gpio mode 7 input
			break
          ;;
		      "tequila orange" )
             gpio mode 22 out
        sleep 3
        gpio mode 22 input \</p><p>        gpio mode 7 out
       sleep 6
       gpio mode 7 input
			break
          ;;
		        "cimetière" )
             gpio mode 2 out
        sleep 2
        gpio mode 2 input \</p><p>        gpio mode 3 out
       sleep 2
       gpio mode 3 input \
	   
	    gpio mode 23 out
        sleep 2
        gpio mode 23 input \</p><p>        gpio mode 25 out
       sleep 2
       gpio mode 25 input \
	   
	   gpio mode 7 out
       sleep 1
       gpio mode 7 input
			break
          ;;
		  *)
			echo "bye"
			break
		  ;;
		  esac
		  done
	 ;;
	 *)
	  echo "bye"
	  break
    ;;
esac
done</p>

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Dash Lid
Intermediate
  • 90
  • 3

Full instructions

The Dash Lid is an easy to use, low friction replenishment device. You just use it like a lid.

Dash Replenish using Amazon DRS and Sensor
Intermediate
  • 270
  • 4

Full instructions

This is guide that how we can Replenish our items using Amazon's Dash Replenish Service and using Ultrasonic Distance Meter.

AstralPi
Intermediate
  • 1,188
  • 17

Work in progress

Telepresence using the RaspberryPi and a VR Headset

Portable Monitor for Home Supplies
Intermediate
  • 108
  • 2

Full instructions

Monitor the levels of your essential supplies and notify or order them automatically when they are low.

RadBit
Intermediate
  • 548
  • 10

FitBit-type bluetooth radiation sensor for tracking radiation exposure (working around X-rays in the hospital, or just life in general).

DRS Enabled Smart Pantry
Intermediate
  • 726
  • 4

Work in progress

A pantry which can automatically replenish kitchen items.

ProjectsCommunitiesContestsLiveJobsBetaFree StoreBlogAdd projectSign up / Login
Respect project