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

Part 2- What Do I Build Next?
Intermediate
  • 138
  • 4

Full instructions

To continue on with my endeavors of creativity..., I Ordered on 1/6/17 from Adafruit my ADABOX002 and it came on 1/8/17

Raspberry Pi/WeatherRack - NodeJS Weather Data Station
Intermediate
  • 745
  • 10

Work in progress

Raspberry Pi, and a WeatherRack, with a WeatherPiArduino, using NodeJS to serve weather station current data.

Connecting Google Home to Raspberry Pi Projects
Intermediate
  • 4
  • 1

Here's an easy way to use Google Assistant Triggers on IFTTT to control your DIY projects!

Raspberry pi speech recognition C#
Intermediate
  • 17
  • 1

Protip

Control everything with your voice with the help of your raspberry pi

Gesture Controlled Lock
Intermediate
  • 307
  • 5

Full instructions

Control a lock by inputting a password via hand gestures.

Solar Powered, Remote Controlled, Smart Garden
Intermediate
  • 4,628
  • 28

Full instructions

Fresh, organic food is important! Grow your own in unused space and take care of it remotely. Plants and smarts are powered by the sun!

ProjectsCommunitiesContestsLiveJobsFree StoreBlogAdd projectSign up / Login
Respect project