Go to advanced search

by knute
Fri Nov 08, 2019 3:13 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

Yes you need to install Java (openjdk-11-jdk). The program is a command line program. You run it with the java command, the name of the Java file and the arguments. java ScaleImage.java sourceFile destFile WxH WxH is the width and height separated by a lower case 'x'. In your case 1200 by 740 would ...
by knute
Wed Nov 06, 2019 12:28 am
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

Yes I’d like to keep the hi res for the timelapse so your idea sounds good, what js did you use? Steve import java.awt.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; public class ScaleImage { public static void main(String... args) throws Exception { System.out.println("Scale...
by knute
Tue Nov 05, 2019 7:44 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

If you don't have need for the hifi image you can have raspistill scale it for you. See the -width and -height command line options. If you want to keep the hifi images on the Pi and serve the lores image you can scale them with another program. I've written simple Java programs to scale images.
by knute
Thu Oct 24, 2019 1:50 am
Forum: Advanced users
Topic: rpi-eeprom beta package - VL805 updates
Replies: 50
Views: 6389

Re: rpi-eeprom beta package - VL805 updates

I really don't understand how all this works so I've got a stupid question. If you run the update next week and it updates the eeprom and then you move the card to another Pi will running update again update that other Pi too?
by knute
Mon Oct 14, 2019 2:24 pm
Forum: Java
Topic: Having trouble with .Jar files
Replies: 2
Views: 1646

Re: Having trouble with .Jar files

Assuming it is a Java program in that .jar file you are trying to run, the easiest thing it to start it from the command line: java -jar nameOfYourJarFile.jar If you want to run it by double clicking on its icon in File Manager: Open the File Manager, right click on the file you want to run, AnalogC...
by knute
Sat Oct 12, 2019 7:22 pm
Forum: General discussion
Topic: "Realtime" audio output using RPi?
Replies: 4
Views: 570

Re: "Realtime" audio output using RPi?

Java has a very simple sound API that works just fine on a Pi. As to the 0-5ms latency I don't know. I think that would be affected by the USB sound card's buffering. In any case that is a really short time, even 1 cycle of 800hz tone takes 1.25ms. What are you using the sound for?
by knute
Wed Oct 09, 2019 2:22 am
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

I never enable ufw until after I allow ssh.

The ufw default is to drop inbounds that are not specifically allowed and to allow outbounds. I don't think you gain anything by rejecting all the inbound as it is really nice to be able to ping the server.
by knute
Mon Oct 07, 2019 8:13 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3B+ Unable to sync to correct time
Replies: 17
Views: 793

Re: Raspberry Pi 3B+ Unable to sync to correct time

It looks like a DNS problem. The output from timedatectl shows not synced. No return from the google.com ping. All symptoms of DNS not working correctly. You might post the last 15 or so lines of /etc/dhcpcd.conf if you are using a static IP. If you are using dhcp then: cat /var/run/dnsmasq/resolv.c...
by knute
Sun Oct 06, 2019 9:04 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

I don't know how you are getting to your remote Pi but I would be very careful with using the ufw rules from above. If you are getting to your Pi via remote ssh you will be locked out forever using those commands. If that is not the case then kindly disregard my note.
by knute
Sat Oct 05, 2019 9:59 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

In the <HEAD> part of the HTML put <meta http-equiv="refresh" content="60"> to get a 60 second reload. If you don't like the flash that will occur with an image there is a more sophisticated method that uses some JavaScript. Take a look at my website, http://knutejohnson.com/pi, there are a couple o...
by knute
Fri Oct 04, 2019 9:35 pm
Forum: Other projects
Topic: Need 5V for my fan, pins covered by RTC?
Replies: 4
Views: 707

Re: Need 5V for my fan, pins covered by RTC?

Did you solder that to the board?
by knute
Tue Oct 01, 2019 9:23 pm
Forum: Other projects
Topic: Need 5V for my fan, pins covered by RTC?
Replies: 4
Views: 707

Need 5V for my fan, pins covered by RTC?

I've got a Pi4 in a case with a fan and a RTC that covers pins 1-6. The fan needs 5V. Is there another pin or place to get 5V on the board? What about the POE pins? I thought as a last resort I could use one of the USB ports for power but that uses up a USB that could be used for something more inte...
by knute
Tue Oct 01, 2019 8:34 pm
Forum: Troubleshooting
Topic: Unable to write a .service file to systemd for auto-booting python programs
Replies: 6
Views: 234

Re: Unable to write a .service file to systemd for auto-booting python programs

The .service files need to go into the /etc/systemd/system directory. That directory is owned by root. The .service file needs to be owned by root. So you need to use sudo on all the command to read or write a file to that directory. Also, the systemd services are run as root unless you specifically...
by knute
Sat Sep 28, 2019 11:15 pm
Forum: Java
Topic: Method in ArrayList?
Replies: 4
Views: 1440

Re: Method in ArrayList?

It's a little more complicated in Java. import java.util.*; import java.util.function.*; public class SSCCE { // simple self contained compilable example public static void main(String... args) { // returns the argument unchanged UnaryOperator<String> u1 = UnaryOperator.identity(); // returns the ar...
by knute
Sat Sep 21, 2019 7:34 pm
Forum: Troubleshooting
Topic: [Solved] Stuck in loop asking for password before desktop. Check your .profile
Replies: 16
Views: 36281

Re: [Solved] Stuck in loop asking for password before desktop. Check your .profile

I had the same thing happen just now and it was a bad uSD card. When they die sometimes they go into read only so they'll boot but you can't login. The only solution is a new card.
by knute
Fri Sep 20, 2019 1:13 am
Forum: Graphics, sound and multimedia
Topic: Web camera and time lapse video
Replies: 1
Views: 163

Re: Web camera and time lapse video

A RaspberryPi, a Pi camera and the ffmpeg program should do what you asked.
by knute
Thu Sep 19, 2019 4:42 pm
Forum: General discussion
Topic: Small piwiz race condition (time sync)
Replies: 25
Views: 1080

Re: Small piwiz race condition (time sync)

To sum up, systemd uses its release date as the initial time. Then it compares the time at boot to the modification time of the drop in file, which is newer. That triggers the warning. I still don't understand why this doesn't affect units without drop in files, but I've had enough digging through ...
by knute
Thu Sep 19, 2019 4:40 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 763

Re: Clock?

So I found out some more interesting stuff. I thought that my Xubuntu box was updating the time much sooner than the desktop came alive. That is incorrect. Xubuntu is using systemd-timesyncd to update its system clock just like Raspbian and it takes about the same amount of time, 20 to 30 seconds. T...
by knute
Wed Sep 18, 2019 3:02 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

eccentricdyslexic wrote:
Wed Sep 18, 2019 2:42 pm
Looks like i have to upgrade to Jessie...hope it doesn't break things... either that or skip hosting and upload the pic every minute..
Buster would be better.
by knute
Wed Sep 18, 2019 3:00 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 763

Re: Clock?

NTP on Raspbian suffers from the same problem, that is not being up when the desktop gets up. It can take 20 to 30 seconds for the system clock to be synchronized and this is playing havoc with some folks programs that load with the desktop and need the current time. I wrote a new script to check th...
by knute
Tue Sep 17, 2019 8:44 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 763

Re: Clock?

It's highly likely that the first attempt for timesyncd to get the time could fail. I've not looked at the dependencies as I've disabled it in favour of good old NTP on all of my systems. I'm a fan of NTP as well. It has the same problem though with Buster. Something is off in the timing somewhere....
by knute
Tue Sep 17, 2019 8:38 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

I'd rather the pi act as a webserver, so as not too use all my bandwidth (internet very poor here). Any good guides to setting up a webserver? sudo apt install apache2 apache2-doc Now you have a web server. Follow neilgl's fine instructions for creating a web page document. Put that in /var/www/htm...
by knute
Tue Sep 17, 2019 3:20 pm
Forum: General discussion
Topic: Small piwiz race condition (time sync)
Replies: 25
Views: 1080

Re: Small piwiz race condition (time sync)

After switching over to Buster Lite, I began having 'apt-get update' failures when it is run immediately after startup. When it became clear the problem was due to the time not being set, I added the following to my startup script and haven't had any problems since: # Wait For Time Synchronization ...
by knute
Tue Sep 17, 2019 3:05 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 2453

Re: Upload a pic every minute

How can one then display the latest image on a webpage? Cheers Steve Just send the image file to the webserver. Do you want your Pi to be the webserver or is it to be remote? If it is local you can just copy the file to the appropriate directory, if remote you can send the photos via FTP or some ot...
by knute
Tue Sep 17, 2019 2:53 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 763

Re: Clock?

Once the network is alive systemd-timesyncd gets the time from an internet time server. It then polls, infrequently, to keep the clock close to the local time of day. I don't know how it knows the network is alive since systemd-timesyncd apparently normally uses systemd-networkd to determine that a...

Go to advanced search