Go to advanced search

by drifterf
Thu Jan 03, 2019 7:54 pm
Forum: Python
Topic: RFID to read from CSV File
Replies: 1
Views: 275

RFID to read from CSV File

Hi guys, i have a script running which is fine for what i need, currently if i want to change accepted rfid tags i go into the script with nano and edit or add as needed. i would like it so the script will read the file (csv etc) and authorize as needed. this would mean i could just edit that file w...
by drifterf
Wed Jan 02, 2019 6:43 pm
Forum: Python
Topic: use a webpage to edit areas of a script
Replies: 4
Views: 494

Re: use a webpage to edit areas of a script

anyone help with this ?
by drifterf
Fri Dec 28, 2018 1:01 pm
Forum: Python
Topic: use a webpage to edit areas of a script
Replies: 4
Views: 494

Re: use a webpage to edit areas of a script

Sounds like a really bad idea. Complex too. Just have your web page save the "5" parameter some place and have the Python script read the value from there and behave accordingly. hi this sounds good, didnt think of it backwards. any idea where to look for learning how to do this ? any webpage etc w...
by drifterf
Fri Dec 28, 2018 11:38 am
Forum: Python
Topic: use a webpage to edit areas of a script
Replies: 4
Views: 494

use a webpage to edit areas of a script

Hi, what i am after is to have a local webpage which can be used to edit parts of a python script easily so its more user friendly. say for instance for making a led stay on for whatever the user wants. so they could just type in "5" and save or something and it would edit part of the script to modi...
by drifterf
Thu Dec 20, 2018 8:31 pm
Forum: Python
Topic: View print data of all scripts running in one terminal ?
Replies: 4
Views: 762

Re: View print data of all scripts running in one terminal ?

im running 2 scripts on startup editing the rc.local . one script to read a rfid and activate a gpio and another as a exit button which activates the same gpio. i cant compile them together at moment due to random things on small project we are doing. could i use this is monitor the state of both sc...
by drifterf
Thu Dec 20, 2018 7:31 pm
Forum: Python
Topic: View print data of all scripts running in one terminal ?
Replies: 4
Views: 762

View print data of all scripts running in one terminal ?

Hi, i have a few scripts running on startup for various things i am messing around with. everything works as needs be but i wondered how to have 1 terminal script running which will show me all the "print" data that is show throughout all the scripts i have running. for example if i have script "1.p...
by drifterf
Tue Dec 18, 2018 5:12 pm
Forum: Python
Topic: RFID Reader question
Replies: 4
Views: 716

Re: RFID Reader question

this is the script that reads the cards and when i run the script and present a token it reads it and displays its information import RPi.GPIO as GPIO import MFRC522 import signal continue_reading = True # Capture SIGINT for cleanup when the script is aborted def end_read(signal,frame): global conti...
by drifterf
Tue Dec 18, 2018 6:23 am
Forum: Python
Topic: RFID Reader question
Replies: 4
Views: 716

Re: RFID Reader question

i have created the 2 seperate scripts whilst learning python via the tutorials on here and in this forum.

as mentioned i dont know what command to use so when the UID is generated it allows the other part of the script to be run.

i believe it is a "if true" command
by drifterf
Mon Dec 17, 2018 8:03 pm
Forum: Python
Topic: RFID Reader question
Replies: 4
Views: 716

RFID Reader question

Hi, thanks to people on here i have got to a stage i now enjoy messing around with my PI i am slowly working towards creating my own access control system with the PI. i have a 522 rfid board which i have a script for to read the fobs and works fine. i want a script so when a certain UID is read it ...
by drifterf
Wed Dec 12, 2018 6:23 am
Forum: Python
Topic: turn on led for period of time with a button
Replies: 12
Views: 1015

Re: turn on led for period of time with a button

thank you this worked, i did try the "while true" but couldnt get it to work, must of typed something wrong, many thanks !! I think this should do it from gpiozero import LED, Button, Buzzer from time import sleep led = LED(17) button = Button(2) buzzer = Buzzer(18) while True: button.wait_for_press...
by drifterf
Tue Dec 11, 2018 8:11 pm
Forum: Python
Topic: turn on led for period of time with a button
Replies: 12
Views: 1015

Re: turn on led for period of time with a button

from gpiozero import LED, Button, Buzzer from time import sleep led = LED(17) button = Button(2) buzzer = Buzzer(18) button.wait_for_press() led.on() buzzer.on() sleep(3) led.off() buzzer.off() i just want to loop this script please. also is there a reason why when i launch the code in idle it take ...
by drifterf
Tue Dec 11, 2018 6:52 pm
Forum: Python
Topic: turn on led for period of time with a button
Replies: 12
Views: 1015

Re: turn on led for period of time with a button

Hi, i really appreciate the tutorial pages you have given me. Just to let you know i have got it sorted and have got what i watned to work to work :) I do need the script to continue working when it has done it cycle. It seems to do the script once and then i have to reload to continue it, i need it...
by drifterf
Mon Dec 10, 2018 9:59 am
Forum: Python
Topic: turn on led for period of time with a button
Replies: 12
Views: 1015

Re: turn on led for period of time with a button

Very basic code to turn a LED on is: import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(18,GPIO.OUT) print "LED on" GPIO.output(18,GPIO.HIGH) time.sleep(1) print "LED off" GPIO.output(18,GPIO.LOW) This assumes the LED is connected to pin #18 - (6th one dow...
by drifterf
Mon Dec 10, 2018 8:42 am
Forum: Python
Topic: turn on led for period of time with a button
Replies: 12
Views: 1015

Re: turn on led for period of time with a button

Hi, thank you all for the replys. i will have a read through of the links, much appreciated !
by drifterf
Sat Dec 08, 2018 9:12 am
Forum: Python
Topic: turn on led for period of time with a button
Replies: 12
Views: 1015

turn on led for period of time with a button

Hi, im working on a small project and have made progress but i need the following i want to activate a led (at the moment, when its working i will be using the gpio for a relay module) i want to press a physical button on the breadboard and have the led stay on for a period of time i can set and the...

Go to advanced search