[Raspberry Pi Original Development] -CALIBAN666-:
Projekt PiRolleo - Toiletpaper Donator + Cashsystem Machine to buy a lil amount of Paper!!!!!

--------

--------

--------

Its an automatic machine which sell some toiletpaper for money like a cokeautomat in cinema or something.

The complete pythonscript+system is 100% brainwork and complete a owner idea,help and ideas from peeps

with interest is welcome,even for the hardware which is an idea and work from us and not complete.

--------

The complete idea is startet in the devbrains of [MENTION=6536578]custom@Boris[/MENTION] + [MENTION=4513035]-CALIBAN666-[/MENTION]

--------

--- Current status is: v4.0.1 alpha ---

Are you ready to test your might,get ready to feel the new "BUTTNESS",the digital site of Toilets,lol!!!!!

-------

import RPi.GPIO as gpio
import time

gpio.setmode(gpio.BCM)
gpio.setup(18, gpio.IN)
gpio.setup(17, gpio.IN)
gpio.setup(14, gpio.IN)
gpio.setup(10, gpio.IN)
gpio.setup(25, gpio.OUT)
gpio.setup(24, gpio.OUT)
gpio.setup(8, gpio.OUT)
gpio.setup(7, gpio.OUT)
free = 0
pin = 0
eur = 0
i = 0

def abrollen():
gpio.output(7, gpio.HIGH)
gpio.output(8, gpio.HIGH)
gpio.output(24, gpio.HIGH)
time.sleep(3)
gpio.output(7, gpio.LOW)
gpio.output(8, gpio.LOW)
gpio.output(24, gpio.LOW)

def schliessen(eur,free):
print " -------------------------"
print " | Kontostand:", eur,"Euro | "
print " -------------------------"

f = file("/media/usb/konto.txt", "w")
f.write("*** Kontostand: ")
f.write(str(eur))
f.write(" Euro *** -PiRolleo gab ")
f.write(str(free))
f.write(" mal gratis Toilettenpapier")
f.close()

gpio.cleanup()
quit()

try:
while True:

gpio.output(7, gpio.LOW)
gpio.output(8, gpio.LOW)
gpio.output(24, gpio.LOW)
gpio.output(25, gpio.LOW)

if gpio.input(14) == gpio.HIGH:
eur = eur + 0.05
abrollen()

if gpio.input(17) == gpio.HIGH:
pin = 0
time.sleep(3)
if gpio.input(17) == gpio.HIGH:
time.sleep(10)

if gpio.input(18) == gpio.HIGH:
pin = pin + 1
time.sleep(1.5)
if gpio.input(18) == gpio.HIGH:
time.sleep(5)

if gpio.input(17) == gpio.HIGH and pin == 3:
time.sleep(3)
if gpio.input(17) == gpio.HIGH and gpio.input(18) == gpio.HIGH:
free = free + 1
abrollen()

if gpio.input(10) == gpio.HIGH:

if eur >= 1 and eur < 2:
gpio.output(25, gpio.HIGH)
time.sleep(3)

if gpio.input(14) == gpio.HIGH:
schliessen(eur,free)

gpio.output(25, gpio.LOW)
time.sleep(3)
gpio.output(25, gpio.HIGH)
time.sleep(1)
gpio.output(25, gpio.LOW)

elif eur >=2 and eur < 3:
gpio.output(25, gpio.HIGH)
time.sleep(3)

if gpio.input(14) == gpio.HIGH:
schliessen(eur,free)

gpio.output(25, gpio.LOW)
time.sleep(3)
gpio.output(25, gpio.HIGH)
time.sleep(1)
gpio.output(25, gpio.LOW)
time.sleep(0.5)
gpio.output(25, gpio.HIGH)
time.sleep(1)
gpio.output(25, gpio.LOW)

elif eur >=3 and eur < 4:
gpio.output(25, gpio.HIGH)
time.sleep(3)

if gpio.input(14) == gpio.HIGH:
schliessen(eur,free)

gpio.output(25, gpio.LOW)
time.sleep(3)
gpio.output(25, gpio.HIGH)
time.sleep(1)
gpio.output(25, gpio.LOW)
time.sleep(0.5)
gpio.output(25, gpio.HIGH)
time.sleep(1)
gpio.output(25, gpio.LOW)
time.sleep(0.5)
gpio.output(25, gpio.HIGH)
time.sleep(1)
gpio.output(25, gpio.LOW)
time.sleep(0.5)

elif eur >= 4:
gpio.output(25, gpio.HIGH)
time.sleep(3)

if gpio.input(14) == gpio.HIGH:
schliessen(eur,free)

gpio.output(25, gpio.LOW)
time.sleep(3)
i = 10

while i>0:
gpio.output(25, gpio.HIGH)
time.sleep(0.1)
gpio.output(25, gpio.LOW)
time.sleep(0.1)
i = i - 1

else:
gpio.output(25, gpio.HIGH)
time.sleep(3)

if gpio.input(14) == gpio.HIGH:
schliessen(eur,free)

gpio.output(25, gpio.LOW)

except KeyboardInterrupt:
gpio.cleanup()

#	*** script by custom@Boris & -CALIBAN666- v4.0.0 alpha ***

--- Changelog ---

-v4.0.0 alpha-

-fixed some bugs

now you have the option to get free paper (press the two buttons in combination)

​

--------

Note:

Its work in progress,the python based own created system is ready,only the hardware needs time,so stay tuned!!!

---------

The attached screenshots are early alphastage,so you dont see the machine as ready worker,its prototype with touch-

steering over gpios and gertboard,stay tuned friends.

---------

Many greeeetz from [MENTION=6536578]custom@Boris[/MENTION] + [MENTION=4513035]-CALIBAN666-[/MENTION] :cowboy:​

XDA:DevDB Information

Projekt PiRolleo - Toiletpaper Donator + Cashsystem Machine, Tool/Utility for the Raspberry Pi

Contributors

-CALIBAN666-, custom@Boris

Version Information

Status: Alpha

Created 2015-05-12

Last Updated 2015-05-15