Go to advanced search

by scotty101
Fri Apr 12, 2019 11:21 am
Forum: Beginners
Topic: How to run an executable file from CRON?
Replies: 5
Views: 146

Re: How to run an executable file from CRON?

would I put something like '0 1 * * * ./executable-file-name /dir1/dir2/dir3 Don't think so. Its something like '0 1 * * * /dir1/dir2/dir3/executable-file-name For example 0 1 * * * /home/pi/myDirectory/myProgram Remember your binary will have to be made executable using chmod +x myProgram
by scotty101
Tue Apr 09, 2019 9:58 am
Forum: Beginners
Topic: Syntax error when trying to run a code written in Idle3 shell
Replies: 2
Views: 136

Re: Syntax error when trying to run a code written in Idle3 shell

You have made the common beginners mistake with IDLE. Don't save the python interactive shell window. When you open IDLE the first window that appears is the Python interactive shell. You need to click "File -> New File" to get another window where you can paste your code. Then you can save this fil...
by scotty101
Mon Apr 08, 2019 4:32 pm
Forum: Python
Topic: Help reading txt file lines
Replies: 3
Views: 467

Re: Help reading txt file lines

Why reinvent the wheel? Why not just use the config parser module in python? https://docs.python.org/3/library/configparser.html?highlight=configparser#module-configparser You can then have a file like the following settings.ini [SETTINGS] nettest_config=0 shoot_config=1 Much easier to read that a f...
by scotty101
Thu Apr 04, 2019 10:31 am
Forum: Python
Topic: Simultaneous control of two stepper motors through a gui (pyqt 5)
Replies: 3
Views: 522

Re: Simultaneous control of two stepper motors through a gui (pyqt 5)

Two methods for you to consider PyQt like many GUI frameworks has a timer mechanism, called QTimer. Rather than using an infinite loop (V bad practice for GUIs), you should have the timer periodically call a function to change the state of the GPIO pins. Second method would be threading. Have a seco...
by scotty101
Thu Apr 04, 2019 8:34 am
Forum: General discussion
Topic: pygame display picture
Replies: 1
Views: 74

Re: pygame display picture

Any reason why you can't just download the images and save them to your Pi rather than downloading them each time?

Can you post the exact error message so that we can see which line caused the error?
by scotty101
Tue Apr 02, 2019 9:32 pm
Forum: Python
Topic: how to make a document accessible from a local flask webpage [solved]
Replies: 5
Views: 237

Re: how to make a document accessible from a local flask webpage

What type of document?
How do you want to view it on the web page?
by scotty101
Tue Apr 02, 2019 5:03 pm
Forum: Python
Topic: Setting a max time for a while loop
Replies: 5
Views: 178

Re: Setting a max time for a while loop

Much simpler way since you can cope with blocking events. import time now = time.time() delay = 10 while True: if time.time() > now + delay: print("Escaping now") break time.sleep(1) print("Escaped!!") This will enter the while loop but break out of it once 10 seconds has passed. While you are in th...
by scotty101
Mon Apr 01, 2019 3:43 pm
Forum: Beginners
Topic: Get a new folder in the the PATH
Replies: 6
Views: 215

Re: Get a new folder in the the PATH

by scotty101
Thu Mar 28, 2019 9:54 am
Forum: Advanced users
Topic: HDMI copy protection via CEC
Replies: 3
Views: 261

Re: HDMI copy protection via CEC

Why on earth would you want to do that?

You can guarantee that within a few hours of you doing something to prevent copy protection that someone will come up with a way to get around it.

If the multi-billion dollar film industry can't do it, what make you think you can?
by scotty101
Tue Mar 26, 2019 8:38 pm
Forum: General discussion
Topic: Feedback machine
Replies: 6
Views: 272

Re: Feedback machine

Do you need a database or would writing the result to a file work?
by scotty101
Mon Mar 25, 2019 1:28 pm
Forum: Automation, sensing and robotics
Topic: Boules
Replies: 4
Views: 226

Re: Boules

Could you please offer more advice on the IR filter. My first attempt with a standard image does not recognize the outline of the shiny balls. I say again Silver Balls on sand won't be a good contrast. Then if you get stuck you can share the code and the photos with others to ask for help. Share so...
by scotty101
Sun Mar 24, 2019 8:42 pm
Forum: Python
Topic: need help searching in tostrings from classes
Replies: 1
Views: 77

Re: need help searching in tostrings from classes

You haven't shared enough code. How are you storing each instance of the Film class? Is it in a list?
by scotty101
Fri Mar 22, 2019 2:10 pm
Forum: General discussion
Topic: GUI question
Replies: 4
Views: 161

Re: GUI question

thanks scotty, how hard do you think it would be for someone whoose most complex code is basic c++ and some latex documents? I don't know how to quantify difficulty to you. Seems like a medium complexity task. Every project is difficult if you expect to do it all at once and without learning the ba...
by scotty101
Fri Mar 22, 2019 9:54 am
Forum: General discussion
Topic: GUI question
Replies: 4
Views: 161

Re: GUI question

Its possible but you'd have to use a more modern GUI Framework like QT in order to get a built in web browser.
by scotty101
Fri Mar 22, 2019 9:52 am
Forum: General discussion
Topic: Cool new "toy" for Pi owners
Replies: 134
Views: 22282

Re: Cool new "toy" for Pi owners

I'll kindly tell them where they can dock their shoddy products.
by scotty101
Fri Mar 22, 2019 9:48 am
Forum: Beginners
Topic: Selecting a web page to display using raspberry pi
Replies: 1
Views: 82

Re: Selecting a web page to display using raspberry pi

I'm guessing you've done something to open the browser when the Pi boots..

Simple solution
Set the default home page on Pi 1 to be webpage 1
Set the default home page on Pi 2 to be webpage 2
Set the default home page on Pi 3 to be webpage 3
by scotty101
Thu Mar 21, 2019 10:08 pm
Forum: Python
Topic: How in the WORLD do I add a background image to my window?
Replies: 7
Views: 264

Re: How in the WORLD do I add a background image to my window?

Thanks for the response! I did see that. I tried everything I can figure out how to try by looking at that. Unfortunately, I haven't gotten anywhere. Do you think I should skip putting an image on it? You say that it's not well supported, does that mean that it negatively impacts it, or just not us...
by scotty101
Thu Mar 21, 2019 8:18 pm
Forum: Python
Topic: How in the WORLD do I add a background image to my window?
Replies: 7
Views: 264

Re: How in the WORLD do I add a background image to my window?

Background images aren't well supported in tkinter. The only way to do it is to add the image to a canvas widget and then place the buttons etc over that.

This stack overflow post explains it

https://stackoverflow.com/questions/101 ... in-tkinter
by scotty101
Thu Mar 21, 2019 8:12 pm
Forum: General discussion
Topic: Nexdock 2 - another shot
Replies: 9
Views: 663

Re: Nexdock 2 - another shot

Won't be backing this time.
Whilst I still use mine Nexdock 1 because it is more convenient that dragging round a monitor, I have to carry a USB mouse to get the thing working.
Got charged import tax and ended up having to fit a replacement PCB.

At least they aren't on Indiegogo this time.
by scotty101
Thu Mar 21, 2019 11:18 am
Forum: Beginners
Topic: Sinusoidallly Modulated Signal Output
Replies: 4
Views: 173

Re: Sinusoidallly Modulated Signal Output

Sure..... Why not just connect a USB Sound Card to your Pi. Amplify if necessary.

Playing an MP3 on a standard media player through the USB Sound Card will do all the conversion necessary to output the sound.
by scotty101
Thu Mar 21, 2019 10:43 am
Forum: Automation, sensing and robotics
Topic: Boules
Replies: 4
Views: 226

Re: Boules

OpenCV and Python. Task will be significantly easier if you use brightly coloured balls that have a high contract from each other and the background. Silver Balls on sand won't be a good contrast. OpenCV will be able to filter the image by colours and then detect circles. Once you've detected the ci...
by scotty101
Wed Mar 20, 2019 12:15 pm
Forum: General discussion
Topic: Bcm2837 datasheet required with rasberry pi model3
Replies: 1
Views: 163

Re: Bcm2837 datasheet required with rasberry pi model3

From https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2837/README.md The underlying architecture of the BCM2837 is identical to the BCM2836. The only significant difference is the replacement of the ARMv7 quad core cluster with a quad-core ARM Cortex A53 (ARMv8) cluster. Use the BCM...
by scotty101
Wed Mar 20, 2019 10:20 am
Forum: Python
Topic: Need help with tkinter - LOTS o help.
Replies: 2
Views: 156

Re: Need help with tkinter - LOTS o help.

I can help you with one of your questions. - How do I place a red indicator "light" (just image), and then have it go green when it gets the GPIO input. Like, switch between the two. Do I just load 1 image when low, then when high, i load a different image? Have a look at my GPIO GUI. It was written...
by scotty101
Wed Mar 20, 2019 9:44 am
Forum: Graphics, sound and multimedia
Topic: Use touchscreen without adapter
Replies: 6
Views: 839

Re: Use touchscreen without adapter

GPIO pins would also be possible to use to connect a display. I'm really interested in this option. Does anyone know which pins need to be connected? (Because most of those screens connect to all the GPIO pins, I'm wondering which pins are actually used.) There are two main types of screens that us...
by scotty101
Tue Mar 19, 2019 2:30 pm
Forum: General discussion
Topic: multiple displays
Replies: 3
Views: 174

Re: multiple displays

It is possible.

You can share all the data pins between multiple displays but have each enable pin connected to a different GPIO. This will allow your code to enable a specific display, update the next and then move on to the next screen.

Go to advanced search