Go to advanced search

by StangPi
Sun Sep 09, 2018 3:22 pm
Forum: Troubleshooting
Topic: eSpeak Problems
Replies: 20
Views: 3990

eSpeak Problems

Recently i discovered the espeak program. Working on integrating it into my program(s), and it has been giving me errors. Errors: ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2239:(snd_pc...
by StangPi
Sun Sep 09, 2018 6:02 am
Forum: Troubleshooting
Topic: espeak TTS ALSA Unknown PCM cards
Replies: 8
Views: 29495

Re: espeak TTS ALSA Unknown PCM cards

Once I get the ALSA errors fixed, I'll do the JackD.

I tried editing the ALSA.conf file but it will not let me save the changes. And still the ALSA erors continue
by StangPi
Sun Mar 18, 2018 6:02 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

The next issue I am working on, is creating new users. print("Please Make User Selection!") result = check_keypad(1) while(result != "1") and (result != "2"): result = check_keypad(1) user = "User" + result with this snippit, the user is designated and once their password is entered correctly they w...
by StangPi
Sat Mar 17, 2018 2:13 am
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Got it working: #print('Password Entered: "{entry}"'.format(entry = result)) usernames = {'User1': "Maker", 'User2': "Guest"} #Password Check if result == password: print(" ----------------------------------") print(" | Welcome {name}!! |" .format(name=usernames[user])) print(" ---------------------...
by StangPi
Sat Mar 17, 2018 1:29 am
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Ok, so i have defined the functions for the users. But I have hit a snag. The current script for my User selection Password verify needs some tweaking. Based on this: result = check_keypad(1) while(result != "1") and (result != "2"): result = check_keypad(1) user = "User" + result #Users if user== "...
by StangPi
Fri Mar 16, 2018 10:31 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

#Imports import RPi.GPIO as GPIO import time #RPi Board Setup GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) #Control Pin List pin = 33 GPIO.setup(pin, GPIO.OUT) try: GPIO.output(pin, GPIO.LOW) print("Done") except KeyboardInterrupt: print("You quitter!") GPIO.cleanup() This code indefinitely tur...
by StangPi
Fri Mar 16, 2018 10:02 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

#Imports import RPi.GPIO as GPIO import time #RPi Board Setup GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) #Control Pin List pinList = [33, 37] #Loop through pins, set mode/state to HIGH for i in pinList: GPIO.setup(i, GPIO.OUT) GPIO.output(i, GPIO.HIGH) #Set time between ML functions DownTime ...
by StangPi
Fri Mar 16, 2018 9:28 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

:facepalm: whoops. Thanks. Felt like I was forgetting something and couldn't figure out what, but i got it figured now.
by StangPi
Fri Mar 16, 2018 9:10 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Ok, i didnt know that. even from reading various tutorials on python. Thank you for explaining it. Since the security checking code is functional, i began writing code for the relay board I will be using. Currently I have only made a test code to ensure they work before actually integrating them. #I...
by StangPi
Tue Mar 13, 2018 11:57 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Well I have pretty much decided on writing one script within one file. Since im not too good with Python yet, the finer details are still a nuisance, like "import". So i was informed earlier in this posting, that the main function was to be positioned at the end of the complete script, while smaller...
by StangPi
Tue Mar 13, 2018 9:02 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Alright so now i have added some simple print commands to display text boxes around certain prompts. Working on making it centered on the screen. Im going to add a few items slowly into this project, but would it be best to code EVERYTHING i want to add in this main script, or would it be better to ...
by StangPi
Fri Mar 09, 2018 8:33 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

I wanted each user to have their own greeting. Which you answered with: usernames = {'User1': "Maker', 'User2': 'Guest'} if result == password: print('Welcome {name}'.format(name=usernames[user])) I stil get confused with syntax. Which explains I thought if result == password(User1) would work. How ...
by StangPi
Thu Mar 08, 2018 8:22 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

I am nowhere near finished, as I do have plans to expand on this program adding features for each user.

I would like to thank you both Paeryn and pcmanbob for all of the help you have given. I've learned quite a lot.
by StangPi
Thu Mar 08, 2018 8:04 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Well I have figure out it is returning the result od the user number entry as the password !!!!! still not sure how yet. this is really hacked about code but it will show you what I have found. import RPi.GPIO as GPIO import time import sys #GPIO Setup GPIO.setmode (GPIO.BOARD) GPIO.setwarnings(Fal...
by StangPi
Thu Mar 08, 2018 8:03 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Now I am doing some cleanup, and beautification: Cleaning up prompts, creating Text boxes. One thing I did notice, and what I am cleaning up is the salutation for when the user is verified: It reads "Welcome User" #Password Check if result == password: print("Welcome User!!") I can insert an if stat...
by StangPi
Thu Mar 08, 2018 7:14 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Thanks Paeryn :) I scoured the code several times, even re-writing whole blocks hoping to accidentally fix the issue lol its always the smallest character that causes issues.
fixed the typo and it works :)

Is there anything you would recommend altering for the better?
by StangPi
Thu Mar 08, 2018 6:21 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

So here is the complete current code: import RPi.GPIO as GPIO import time #GPIO Setup GPIO.setmode (GPIO.BOARD) GPIO.setwarnings(False) COL = [7,11,13,15] ROW = [12,22,29,31] for j in range(4): GPIO.setup(COL[j], GPIO.OUT) GPIO.output(COL[j], 1) for i in range(4): GPIO.setup(ROW[i], GPIO.IN, pull_up...
by StangPi
Thu Mar 08, 2018 5:45 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

There was nothing wrong with your code. Im not one to just use someone else's work and claim it, in some way, as my own. Whatever I am working on, techy or otherwise, i feel more accomplished when i know its ALL from me. I want to learn programming and if I happen to receive functional code, ill use...
by StangPi
Thu Mar 08, 2018 12:39 am
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Thats what I was working on figuring out lol when I press the keypad keys nothing shows up on screen, like when you log into pi.
Will give it a shot after work.
by StangPi
Wed Mar 07, 2018 10:19 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

It did the same for me as well. What id like to happen is to select the user: pressing 1 or 2, which then loads the password prompt. Once the correct user password is input, it will allow access to/start functions for that user. Now I need to get the password verifier working. Right now it just give...
by StangPi
Wed Mar 07, 2018 7:13 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Sorry bout the delayed reply, internet issues. The issue I am having is the initial user selection. At the start using the keypad 1 or 2 should be entered and from there the password gets entered. When i run the code, i enter 1 for User 1, but it gives me "Welcome User" and then shuts down. i do not...
by StangPi
Tue Mar 06, 2018 3:49 am
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

I altered the code somewhat: if user == "user2": password = "123456" length = len(password) # get password from keypad print ("enter password on key pad") result = check_keypad(length) # check password if result == password: print ("Password correct welcome ",user) else: print("Error Password does n...
by StangPi
Tue Mar 06, 2018 2:47 am
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

Code: Select all


MATRIX = [["1","2","3","A"],
              ["4","5","6","B"],
              ["7","8","9","C"],
              ["0","F","E","D"]]

Is there a particular difference between using apostrophes( ' ), or quotations( " " ) ?
by StangPi
Mon Mar 05, 2018 10:50 pm
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

I wasn't expecting a full written code, thanks you. Will definitely help me to understand python and complete my project. A few things: 1--This code is to identify the GPIO connections and functions. What does the GPIO.setwarnings do? Im guessing what its named for, but i mean how so? 2--> result = ...
by StangPi
Mon Mar 05, 2018 5:28 am
Forum: Python
Topic: Program not running
Replies: 63
Views: 5583

Re: Program not running

I'd say put the code in your Keypad2.py into functions (otherwise the code will run when imported rather than when you want it to), then when you want to use those functions in other files you can import the module and call the relevant functions. So you could have three functions, one to initialis...

Go to advanced search