Go to advanced search

by knute
Wed Apr 24, 2019 1:40 pm
Forum: Other projects
Topic: Setup button and programing in JAVA
Replies: 1
Views: 13

Re: Setup button and programing in JAVA

I'm not sure what your problem with your circuit is but I would change the way it works to use a pull up on the input pin and then just ground the gpio pin with the button. No resistor needed.
by knute
Mon Apr 22, 2019 9:12 pm
Forum: Advanced users
Topic: Simple GUI config - wifi, IP, timezone
Replies: 3
Views: 86

Re: Simple GUI config - wifi, IP, timezone

I can think of a lot of ways to do this but off the top of my head, I would say run your configuration program as a desktop entry and once the user enters the applicable data, write a message to a file that says it has been set or erase the desktop entry or? You could have another icon on the deskto...
by knute
Sat Apr 13, 2019 5:03 pm
Forum: Automation, sensing and robotics
Topic: Looking for help with DHT11 humidity and temperature sensor
Replies: 12
Views: 380

Re: Looking for help with DHT11 humidity and temperature sensor

The simplest way is to use the dht11 overlay. You just read the data out of a file. It works fine. Thanks for the reply knute, Do you have some instructions you could link me to for using the dht11 overlay? Thank you :) Turn off your pi and disconnect the power. Connect the + lead of your DHT senso...
by knute
Fri Apr 12, 2019 3:07 am
Forum: Networking and servers
Topic: Creating a 2 Player Java game using the PI B+
Replies: 2
Views: 88

Re: Creating a 2 Player Java game using the PI B+

That sounds like a fun project. Before you actually code it, you should decide exactly how the game and the players are going to interact. Then you can decide on what messages you need to pass between the clients and the server. So big picture I can see the first player logs into the server and he b...
by knute
Fri Apr 05, 2019 1:58 am
Forum: Automation, sensing and robotics
Topic: Looking for help with DHT11 humidity and temperature sensor
Replies: 12
Views: 380

Re: Looking for help with DHT11 humidity and temperature sensor

The simplest way is to use the dht11 overlay. You just read the data out of a file. It works fine.
by knute
Fri Mar 29, 2019 8:13 pm
Forum: Troubleshooting
Topic: Pi won't play sounds from Java Midi Library
Replies: 5
Views: 130

Re: Pi won't play sounds from Java Midi Library

Your MidiTest code works fine on my RaspberryPi. I tested it with Oracle Java 8, OpenJDK 8 and OpenJDK 11. I am sending my audio through the HDMI port so maybe your problem is with the headphone jack or directing the audio there. If you are using OpenJDK 8 from the repository you need to modify the ...
by knute
Mon Mar 25, 2019 8:08 pm
Forum: Troubleshooting
Topic: SSH out of Raspberry Pi
Replies: 11
Views: 335

Re: SSH out of Raspberry Pi

Just so I'm sure I understand your setup, you've got two computers, a Pi and Windows PC on a LAN. Both connect to the Linux box's network via VPN but only the Windows PC can ssh into the Linux box? Or are you using the LAN's router to VPN to the Linux box's network? So I would turn on the VPN on the...
by knute
Mon Mar 25, 2019 4:11 pm
Forum: Troubleshooting
Topic: SSH out of Raspberry Pi
Replies: 11
Views: 335

Re: SSH out of Raspberry Pi

Is the Windows PC on 192.168.1.? or a different subnet completely from the Pi's VPN network? If it is then maybe the 'firewall' (whatever that is) is rejecting addresses from 192.168.1.*.
by knute
Mon Mar 25, 2019 12:22 am
Forum: Troubleshooting
Topic: SSH out of Raspberry Pi
Replies: 11
Views: 335

Re: SSH out of Raspberry Pi

You don't need sudo. Can you ping the firewall at that address? Do you really need to log in as root?
by knute
Wed Mar 20, 2019 7:02 pm
Forum: Java
Topic: JavaFX MediaPlayer crash
Replies: 3
Views: 3099

Re: JavaFX MediaPlayer crash

Did you have any success with this? I am able to get mp3 files to play. I am running this on Raspbian stretch lite (11/13/2018 release) java version "1.8.0_65" Java(TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode) I overlayed this with: armv6h...
by knute
Fri Mar 15, 2019 7:25 pm
Forum: Troubleshooting
Topic: raspistill problem - solved!
Replies: 0
Views: 261

raspistill problem - solved!

******************************************************************* I seem to have solved this by downloading the userland code and compiling it. The version of raspistill now is 2e2899cc6f3c. ******************************************************************* I'm having an odd problem with raspisti...
by knute
Wed Mar 13, 2019 10:43 pm
Forum: Wanted
Topic: Need a program, $$$ offered
Replies: 2
Views: 598

Re: Need a program, $$$ offered

pi at knutejohnson dot com
by knute
Sat Mar 02, 2019 11:59 pm
Forum: Java
Topic: OpenGL and Java?
Replies: 5
Views: 3412

Re: OpenGL and Java?

So I got it sort of working by using Alexi Shipilev's openjdk11, https://builds.shipilev.net/openjdk-jdk11/, for arm build and adding a command line switch from a Oracle document, https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/java2dpipeline004.html, and disabling the use of the...
by knute
Wed Feb 27, 2019 9:41 pm
Forum: Java
Topic: I want to initialize two dimensional array in constructor
Replies: 1
Views: 2755

Re: I want to initialize two dimensional array in constructor

public class test { private String[][] table; public test() { table = new String[][] {{"ID","NAME"}, {"101","Max"}, {"102","Mark"}}; } public static void main(String... args) { test test = new test(); for (int i=0; i<test.table.length; i++) { for (int j=0; j<test.table[0].length; j++) { System.out....
by knute
Sat Feb 23, 2019 1:41 am
Forum: Troubleshooting
Topic: Autostart a .jar file as root at boot
Replies: 2
Views: 181

Re: Autostart a .jar file as root at boot

I think you are going to have all sorts of issues if you attempt to run the desktop as root. I would start the Java program with sudo in a desktop file.
by knute
Mon Feb 11, 2019 12:04 am
Forum: Java
Topic: OpenGL and Java?
Replies: 5
Views: 3412

Re: OpenGL and Java?

Might be helpful to include your java code. Code shouldn't make any difference but here is what I usually use to test whether the OpenGL pipeline is actually working. import java.awt.*; import java.awt.event.*; import java.lang.reflect.*; import javax.swing.*; /** * Demonstrates a method to do fast...
by knute
Sat Feb 09, 2019 6:31 pm
Forum: Java
Topic: OpenGL and Java?
Replies: 5
Views: 3412

OpenGL and Java?

Anybody know how or if it is even possible to get Java to use the OpenGL pipeline? I'm running current up to date raspbian with the OpenGL desktop driver enabled. Java is latest openjdk version 8. [email protected]:~ $ java -version openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8...
by knute
Fri Feb 08, 2019 10:53 pm
Forum: Beginners
Topic: Writing to systemd journal from C code
Replies: 2
Views: 88

Re: Writing to systemd journal from C code

Code: Select all

$ gcc -lm -lrt -lwiringPi -lwiringPiDev -l libsystemd-dev -pthread -o prog prog.c
/usr/bin/ld: cannot find -llibsystemd-dev
I think you have too many 'l's here.
by knute
Mon Feb 04, 2019 12:09 am
Forum: Troubleshooting
Topic: Cable and power supply tests
Replies: 1
Views: 174

Cable and power supply tests

I had gotten a low voltage warning a while back and it got me to thinking about power supplies and cables. So I bought some cables that were advertised as lower resistance and I had a few already that I could try out. I tested six cables all with the same power supply and five power supplies without...
by knute
Sat Jan 26, 2019 10:47 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 19
Views: 4392

Re: Desktop indicators bleed through JavaFX

I just solved my problem playing sound by editing the /etc/java-8-openjdk/sound.properties file according to this post: https://nealvs.wordpress.com/2017/08/11/java-sound-on-a-raspberry-pi-with-openjdk/ It says to comment out the icedtea pulseaudio properties and go back to the com.sun.media.sound p...
by knute
Sat Jan 26, 2019 10:30 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 19
Views: 4392

Re: Desktop indicators bleed through JavaFX

I don't know what's going on with FX. I just tried to run a JavaSound program and it doesn't work either. I get LineUnavailableExceptions. Not sure what is going on, I thought this worked just fine before. Try the short program below on a wave file and see if that plays. I tried putting Oracle's Jav...
by knute
Fri Jan 25, 2019 11:28 pm
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 19
Views: 4392

Re: Desktop indicators bleed through JavaFX

I haven't done much with FX on the Pi because it didn't work very well for quite a while. I know you can use Aleksy Shipilev's (https://builds.shipilev.net/openjdk-jdk11/) arm build of openJDK11 and gluon's JavaFX 11 early access for the arm. I don't know what repo has 11, when I look I just see ope...
by knute
Fri Jan 25, 2019 2:02 am
Forum: Advanced users
Topic: Virtual com port drivers?
Replies: 9
Views: 671

Re: Virtual com port drivers?

Thanks for all the information. I got the sensor and plugged it in and it creates the /dev/ttyUSB0 device. I even got their SDK to compile and run some test programs on the Pi.

Thanks again for all the help.
by knute
Fri Jan 25, 2019 1:59 am
Forum: Java
Topic: Desktop indicators bleed through JavaFX
Replies: 19
Views: 4392

Re: Desktop indicators bleed through JavaFX

An update on my previous post. This worked great for graphics, but was crashing with a SEGFAULT when trying to play a media clip. Based on another post, I forced a reinstall and that seems to have fixed it. sudo apt-get install --reinstall -y openjdk-8-jre-headless openjdk-8-jre openjfx It does see...
by knute
Sun Jan 20, 2019 12:30 am
Forum: Advanced users
Topic: Virtual com port drivers?
Replies: 9
Views: 671

Re: Virtual com port drivers?

Thanks everybody for all the information. I'm supposed to have the sensor next week to play with. I'm sure I will have more question later.

Thanks!

Go to advanced search