Go to advanced search

by jehutting
Mon Aug 10, 2020 8:59 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

You get a black screen on your HDMI screen???
What happens on the TFT display?
How did you managed to get it on the HDMI?
by jehutting
Mon Aug 10, 2020 8:24 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

I only have a LED and a Button connected to my Raspberry Pi testrig; no display, no audio and no compass sensor.
by jehutting
Mon Aug 10, 2020 7:42 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Yes... and hopefully it works :-)
by jehutting
Mon Aug 10, 2020 7:02 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Ha ha... yes now GPIO27 has mode OUT, but PIN38 shows mode IN whereas I expect mode ALT0 as for the audio interface.

Looking at all your hardware, you can try to use GPIO22 pin#15 for the button.
by jehutting
Mon Aug 10, 2020 5:51 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Still strange... as when I run "gpio readall" I see my LED output changed to mode OUT, whereas your LED still persist on mode IN.
by jehutting
Mon Aug 10, 2020 5:30 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Could you update the link to the image as it is shown as (text) Image.
by jehutting
Sun Aug 09, 2020 12:17 pm
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Hmm... I'm not sure if you can use GPIO20 (pin #38) as it is also defined as DIN-signal by the I2S interface. This interface drives your MAX98357A audio module. Is the gpio readall screenshot made while the tracker is running? GPIO27 is showing as IN, and I am in doubt that GPIO28 should be shown as...
by jehutting
Sat Aug 08, 2020 4:20 pm
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

If you have a dropbox account you can share a folder with your videos.
Allow <you got my email address>. Or send me an email and I will give you access to a shared folder of mine.
by jehutting
Sat Aug 08, 2020 12:54 pm
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

I don't think the button code (gpiozero or RPi.GPIO) causes the 30 seconds black screen. You could try that out by not using "addContact = True" which occurs in the main loop after you have pressed the button (which increments the numberOfButtonPresses variable in the button event handler my_callbac...
by jehutting
Sat Aug 08, 2020 11:16 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

or when the LED is connected to pin 16

Code: Select all

led = LED(23)
by jehutting
Sat Aug 08, 2020 11:11 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

According to https://gpiozero.readthedocs.io/en/stable/recipes.html#pin-numbering pin 13 is GPIO27, so the statement #26 should be led = LED(27) The button is connected to pin 38 and is indeed GPIO20, and it is defaulted to be pulled-up, so that one should be working... here I'm a little bit puzzled...
by jehutting
Sat Aug 08, 2020 10:01 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Alright then, attached the reverted back to the original main.py but with the new LED & button gpiozero functionality in place.
If this still fails you need to go back to your old main.py and see if your aliens motion tracker woks (so without the gpiozero stuff).
by jehutting
Sat Aug 08, 2020 9:41 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Just a question... apart from the LED, do you have the aliens motion tracker program already full running?
by jehutting
Sat Aug 08, 2020 9:03 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Made the hardware matching your testrig. Also removed the blink function description. Attached the main.py within a .zip file to this post.
by jehutting
Sat Aug 08, 2020 7:53 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Did you remove line 43, change the hardware pin numbers, and tried to run the code?
Try that first. After the confirmation that it works, I will revert and clean up the code to your original code, that's no problem.
by jehutting
Sat Aug 08, 2020 7:28 am
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

Line 43: probably a strange (unicode?) character in it due to the copy-and-paste? Copied posted code and opened it with vi/nano/visual code editor but none reveal a strange (/unknown) character on that line. What editor are you using? Just delete the faulty line as it is only a description of the bl...
by jehutting
Fri Aug 07, 2020 2:01 pm
Forum: Nederlands
Topic: videoproject
Replies: 2
Views: 622

Re: videoproject

Ben wel nieuwsgierig hoe het met je project gaat/gegaan is. Een update van je post wellicht de moeite waard voor eenieder?
by jehutting
Fri Aug 07, 2020 1:55 pm
Forum: Nederlands
Topic: raspberry os hifiberry cmd etc/modules: bestand bestaat niet
Replies: 3
Views: 550

Re: raspberry os hifiberry cmd etc/modules: bestand bestaat niet

Ik heb weliswaar een andere I2S "hat", maar dat mag de pret niet drukken, denk ik. De hat heb ik in het verleden op stretch werkende gekregen en wil het wel eens met Buster uitproberen, en wellicht kan ik jou daarna helpen (dit is echter geen belofte! :-) Wat voor RPi model (../3B/3B+/4) gebruik je?...
by jehutting
Fri Aug 07, 2020 1:43 pm
Forum: Nederlands
Topic: Is dit uberhaubt mogelijk?
Replies: 6
Views: 807

Re: Is dit uberhaubt mogelijk?

Wellicht kun je python-vlc gebruiken in combinatie met RPi.GPIO/gpiozero.
Ik gebruik voornamelijk OMXPlayer maar deze is helaas 'depricated' en werkt niet lekker op een RPi4.
Welk Raspberry Pi model (../3B/3B+/4) gebruik je / ga je gebruiken?
Wat is het formaat (h.264/hevc/mpeg2/avi) van je filmpjes?
by jehutting
Fri Aug 07, 2020 1:28 pm
Forum: Python
Topic: Help with led.
Replies: 48
Views: 1689

Re: Help with led.

As already mentioned in a previous post, you better use gpiozero's LED blink function. I do not know if you can use gpiozero and RPi.GPIO at the same time, so you better use gpiozero's Button functions as well. Just for fun... #!/usr/bin/python3 # From https://www.raspberrypi.org/forums/viewtopic.ph...
by jehutting
Fri May 22, 2020 6:20 am
Forum: Nederlands
Topic: bestand kopieren
Replies: 2
Views: 539

Re: bestand kopieren

Mbv de 'sudo mount -a' wordt je NAS backupfolder 'rpi' gemount aan de Raspberry Pi folder '/mnt/backup'. Deze folders zijn als het ware dezelfde; schrijf je (op je Raspberry Pi als root zijnde) naar '/mnt/backup' dan schrijf je eigenlijk naar je backupfolder 'rpi'. Voor lezen geldt hetzelfde. Dus, j...
by jehutting
Sat Feb 01, 2020 8:57 am
Forum: Troubleshooting
Topic: omxplayer called from timeout having problems
Replies: 1
Views: 333

Re: omxplayer called from timeout having problems

things work fine as long as omxplayer "likes" the file. If not, it can sometimes hang "forever"...
Use omxplayer option -g for getting an "omxplayer.log" file. Maybe that reveals why omxplayer doesn't like the file.
Posting your script helps too...
by jehutting
Sat Feb 01, 2020 8:46 am
Forum: General discussion
Topic: Playing music files on Raspberry Pi 3
Replies: 4
Views: 602

Re: Playing music files on Raspberry Pi 3

Be aware that omxplayer can only play one file at the time. So omxplayer *.mp3 simply won't work. Also omxplayer doesn't support .m3u files (again, due to the single file play). In case you have a music file with spaces in the name, use e.g. double quotes. omxplayer "filename with spaces.mp3" Postin...
by jehutting
Thu Jan 16, 2020 5:49 pm
Forum: Nederlands
Topic: Renaissance van de Philips BX200U
Replies: 1
Views: 549

Re: Renaissance van de Philips BX200U

Een dikke pluim voor je project!
by jehutting
Mon Sep 02, 2019 10:39 am
Forum: Python
Topic: Audiobook - OMXplayer pause issue
Replies: 4
Views: 458

Re: Audiobook - OMXplayer pause issue

Use subprocess poll() to check if the player is still alive. Poll() returns None when the process hasn’t terminated yet. if input in ("L","M","T","U") : print input if player.poll() is None: print ("Pause") player.stdin.write("p") Do the same for the volume + and - code.

Go to advanced search