Go to advanced search

by stanwin00
Sun Mar 15, 2020 2:18 am
Forum: Troubleshooting
Topic: Raspberry Pi Touchscreen display
Replies: 1
Views: 179

Raspberry Pi Touchscreen display

Hi guys, I have a pi touchscreen (official model) and it was working well until recently. It first started showing grainy lines and then a big black spot and then most recently it went blank. Although the screen went blank, my pi and my python script is still working well. Therefore this is probably...
by stanwin00
Thu Feb 13, 2020 3:18 am
Forum: Beginners
Topic: headless pi randomly hangs up today
Replies: 1
Views: 140

headless pi randomly hangs up today

Hi, My headless rpi was running smoothly for awhile until this morning when it suddenly hanged up. A reboot was required. I've checked the logs of debug, messages, syslog, kern.log and found nothing except for a plymouth sigterm message in the morning. Is there any place else to look to find out why...
by stanwin00
Thu Feb 06, 2020 2:20 am
Forum: Beginners
Topic: GPIO outputs
Replies: 11
Views: 1284

Re: GPIO outputs

@bope thanks for that. Yes i agree that for my next project i should fix the hardware side. However on second thought, my wire to GPIO4 is probably about 2 to 3m long at best. Will that still pick up emf signals?

@gordon77 thanks for the tip. it seems to be holding. No reported spikes since yesterday
by stanwin00
Wed Feb 05, 2020 1:38 am
Forum: Beginners
Topic: GPIO outputs
Replies: 11
Views: 1284

Re: GPIO outputs

thanks @bope, that solution sounds logical but that means it would cause me more hardware installation overhead. perhaps one for the future. Why does this occur though? Will this same problem occur if we are not using a raspberry pi? and using the standard microcontroller board? I'll try out @gordon...
by stanwin00
Tue Feb 04, 2020 9:25 am
Forum: Beginners
Topic: GPIO outputs
Replies: 11
Views: 1284

Re: GPIO outputs

as a matter of fact that GPIO(4) does have a long wire connected to it. I was afraid it will be that conclusion.... @rpiMike
by stanwin00
Tue Feb 04, 2020 9:05 am
Forum: Beginners
Topic: GPIO outputs
Replies: 11
Views: 1284

Re: GPIO outputs

Hi @rpiMike, i've checked and the interface is disabled. I've tried adding GPIO.output(12, GPIO.LOW) at the top of the button function to ensure the lock stays closed but it clashes with my other threads.

Not sure how else i can code this.
by stanwin00
Tue Feb 04, 2020 8:13 am
Forum: Beginners
Topic: GPIO outputs
Replies: 11
Views: 1284

GPIO outputs

Hi experts, i recently deployed a working access control electromagnetic door lock system with the usage of tkinter for loading the gui on my display. I have 4 threads running in my application using the method Thread: 1) tkinter gui main thread 2) USB reader for reading rfid cards thread 3) Flask a...
by stanwin00
Sat Dec 21, 2019 6:58 am
Forum: Troubleshooting
Topic: Maglock
Replies: 2
Views: 284

Re: Maglock

Raspberry pi - > power the relay

one wire from the NC port of the relay to one wire of the door lock.

The other wire from the relay connect to the negative terminal of the power supply.

The other wire of the door lock connect directly to a 12v power supply.
by stanwin00
Fri Dec 20, 2019 7:03 am
Forum: Troubleshooting
Topic: Maglock
Replies: 2
Views: 284

Maglock

Guys hopefully you can help me. This is how I connect my em lock. But whenever I power on my em lock (switching on the power supply) my rfid card just doesn't work after one try. But when I disconnect my em lock, the rfid reader works without any problem. Power to em lock 12v Current to em lock 2amp...
by stanwin00
Tue Dec 17, 2019 11:24 am
Forum: Troubleshooting
Topic: MFRC522 rFID
Replies: 2
Views: 150

Re: MFRC522 rFID

The same single reader, or a different reader of the same model ? Are you sure the Python code on the two Pi are 100% identical ? Yes it's the same single reader. Regarding code wise, one has a tkinter the working one doesn't have tkinter but I already tried creating a simple read script to get the...
by stanwin00
Tue Dec 17, 2019 7:55 am
Forum: Troubleshooting
Topic: MFRC522 rFID
Replies: 2
Views: 150

MFRC522 rFID

my rfid module has been connected fine and working fine until a few hours ago today. It stopped reading all of a sudden. I've tried swapping out modules and wires that are known to be working well and even tested it with the multimeter but the reader does not read the card when it is brought near af...
by stanwin00
Mon Nov 25, 2019 2:24 am
Forum: Troubleshooting
Topic: MySQL server has went away (broken pipe error)
Replies: 3
Views: 245

Re: MySQL server has went away (broken pipe error)

I believe the interactive_timeout solved the problem. This morning when i rechecked the mariadb error logs on the remote sql server (windows machine), i didn't see any disconnection until the reboot at 4am. but in anycase, rough code is below. should be able to verify. import pymysql.cursor import t...
by stanwin00
Sun Nov 24, 2019 3:45 am
Forum: Troubleshooting
Topic: MySQL server has went away (broken pipe error)
Replies: 3
Views: 245

MySQL server has went away (broken pipe error)

I'm trying to run my raspberry pi as an access door lock so meaning to say my RFID reader should always be up 24/7 allowing people to access it. While stress testing i got the following error (as per subject line) so upon some research, i went to change the wait_timeout as well as the interactive_ti...
by stanwin00
Thu Nov 21, 2019 6:05 am
Forum: Beginners
Topic: autoboot script does not function
Replies: 8
Views: 838

Re: autoboot script does not function

thanks @pcmanbob I solved my problem by editing the /etc/profile and adding a line in that file.

Code: Select all

(sleep 10; python3 /home/pi/script.py) &
This worked like a charm.
by stanwin00
Wed Nov 20, 2019 8:23 am
Forum: Beginners
Topic: autoboot script does not function
Replies: 8
Views: 838

Re: autoboot script does not function

Sorry guys i got to resurrect this question. I made some modifications to ensure my script runs on python3 but now i'm getting the following error. I need the script to run headless. meaning whenever power comes back to the pi, the script will run without needing me to activate the script . The scri...
by stanwin00
Tue Oct 22, 2019 6:33 am
Forum: Beginners
Topic: autoboot script does not function
Replies: 8
Views: 838

Re: autoboot script does not function

@Paeryn THANKS! it worked like a charm. Didn't know you can just call the launcher script without using "sh". Problems solved now. and no i didn't create a directory called directory. It was just for posting on this forum :) I've also cd into the directory itself remove one line from the script. Tha...
by stanwin00
Tue Oct 22, 2019 2:16 am
Forum: Beginners
Topic: autoboot script does not function
Replies: 8
Views: 838

Re: autoboot script does not function

Thanks for the responses so far @pcmanbob and @Paeryn. I've tried the python method as suggested by pcmanbob and that would work if my script was in my home folder. however i need to CD into another folder outside of home first as the script relies on files there as well. Is that something i can inc...
by stanwin00
Mon Oct 21, 2019 6:42 am
Forum: Beginners
Topic: autoboot script does not function
Replies: 8
Views: 838

autoboot script does not function

Hi experts, I'm facing a weird problem here as my launcher script runs on boot up and it launches the python script. HOWEVER, whilst there is a gui on the screen and the buttons are working, however the main function of the script is not executing at all... When i execute the python script in the te...
by stanwin00
Wed Oct 16, 2019 2:53 am
Forum: Troubleshooting
Topic: tkinter button widget
Replies: 4
Views: 331

Re: tkinter button widget

@scotty101, tried it and the after method worked like a charm. all i had to do was call the function that hid my qr code image and then call the welcome screen from that function itself. Thanks for letting me know more about tkinter!
by stanwin00
Tue Oct 15, 2019 9:44 am
Forum: Troubleshooting
Topic: tkinter button widget
Replies: 4
Views: 331

Re: tkinter button widget

@scotty101, i agree with you. there must be a better way of dealing with gui in python lol. How's that any different from just using time.sleep(5) and then calling the function. I googled tkinter after and the user demo is exactly like using two lines of code by calling time first and then the subse...
by stanwin00
Tue Oct 15, 2019 8:26 am
Forum: Troubleshooting
Topic: tkinter button widget
Replies: 4
Views: 331

tkinter button widget

Hi all, I have created a QR Btn using the tkinter class. Code is as below. My frame is initialized as self.tk. The issue arises when i try to add a self.photoLabel.grid_forget() in the showqr function. The QR image doesn't show however the function is called as there is a flicker on the screen. Howe...
by stanwin00
Tue Oct 15, 2019 3:13 am
Forum: General programming discussion
Topic: SQL and raspberry pi
Replies: 6
Views: 2167

Re: SQL and raspberry pi

thanks @dougie. I can now have a beer or tea lol. I did a simpler method. I installed mariadb on my windows pc and then imported the database over. The rest is all about configuring and flushing privileges lol. Thanks for the tip!
by stanwin00
Mon Oct 14, 2019 9:41 am
Forum: General programming discussion
Topic: SQL and raspberry pi
Replies: 6
Views: 2167

Re: SQL and raspberry pi

@dougie, not sure if you've seen my edited answer above but i'm trying to move the database out of the pi itself and get the pi to access it from a centralized database because when i deploy, there will be multiple pis and i don't want to have to update it locally each time i get new entries into th...
by stanwin00
Mon Oct 14, 2019 8:16 am
Forum: General programming discussion
Topic: SQL and raspberry pi
Replies: 6
Views: 2167

Re: SQL and raspberry pi

@dougie yes it is mysql. Just need to understand the configurations required and why it's done like that. Articles i found online seem to indicate the sql server is on the pi itself and i'm connecting to it rather than the pi connecting to my database outside. The reason why i'm doing this is to avo...
by stanwin00
Mon Oct 14, 2019 7:35 am
Forum: General programming discussion
Topic: SQL and raspberry pi
Replies: 6
Views: 2167

SQL and raspberry pi

Ok, so i've been trying to figure out a few things via googling on the web and i'm pulling my hairs out. 1) when i try to move my database configuration out of my python script into a separate file for cleaner code and structure, i cannot connect to the database even though it was the same connectio...

Go to advanced search