Go to advanced search

by savageautomate
Sun Feb 10, 2013 7:45 pm
Forum: Java
Topic: DS18B20 Temperature sensor and Java
Replies: 8
Views: 12228

Re: DS18B20 Temperature sensor and Java

You want to write the Linux driver for the device?
by savageautomate
Sat Feb 09, 2013 6:42 pm
Forum: Java
Topic: DS18B20 Temperature sensor and Java
Replies: 8
Views: 12228

Re: DS18B20 Temperature sensor and Java

Hi skappler, The Pi4J library does not provide any console interactivity, its just a programming library to communicate with GPIO, RS232, SPI, and I2C on the hardware. According to this article ( http://webshed.org/wiki/RaspberryPI_DS1820 ) the DS18B20 sensor requires a 1-wire interface. There is no...
by savageautomate
Sat Feb 09, 2013 6:27 pm
Forum: Java
Topic: GPIO with JDK8 on RPI
Replies: 3
Views: 1382

Re: GPIO with JDK8 on RPI

Thanks Xerxes for the mention!

Just make sure to download the latest 0.0.5-SNAPSHOT release of Pi4J for use with JDK8 (early access).
http://code.google.com/p/pi4j/downloads/list

I am working to try and get 0.0.5 released soon.

Thanks, Robert
by savageautomate
Wed Jan 30, 2013 2:46 am
Forum: Java
Topic: Reading temp using MCP3800
Replies: 2
Views: 2277

Re: Reading temp using MCP3800

Hi Andy, I don't have an example on hand, but I would suggest using a library such as Pi4J that provides access to the SPI communication bus. https://github.com/Pi4J/pi4j/blob/master/pi4j-core/src/main/java/com/pi4j/wiringpi/Spi.java (This class is a JNI wrapper around the SPI implementation in the ...
by savageautomate
Thu Jan 24, 2013 11:29 am
Forum: Java
Topic: Can the Pi run .jar files?
Replies: 10
Views: 42726

Re: Can the Pi run .jar files?

This page describes how to install Pi4J and where the files are installed and includes instructions for how to compile the examples. http://pi4j.com/install.html Beyond that, you may want to explore some of the examples starting with this page: http://pi4j.com/example/control.html Thanks, Robert
by savageautomate
Mon Jan 14, 2013 3:40 pm
Forum: Java
Topic: Java basic & Libraries
Replies: 7
Views: 2103

Re: Java basic & Libraries

I'm practising loops, methods, classes, variable, arrays which are all standard to Java, no matter what device I use right?. I guess that the purpose of using a libraries is to communicate with other hardware, like you said "in the physical world". Like -rst- said, Libraries are not just for hardwa...
by savageautomate
Sun Jan 13, 2013 6:49 pm
Forum: Java
Topic: Java basic & Libraries
Replies: 7
Views: 2103

Re: Java basic & Libraries

If you are just getting started and you do want to control things in the "physical world", here is a very simple Java project that can control power to a device. All open source :-)
http://www.savagehomeautomation.com/pro ... ights.html

-Robert
by savageautomate
Sun Jan 13, 2013 6:47 pm
Forum: Java
Topic: Java basic & Libraries
Replies: 7
Views: 2103

Re: Java basic & Libraries

Well, it depends on what you are wanting to do. For example, if you want to control or sense things using the GPIO pins then you may want to use something like Pi4J (http://www.pi4j.com)

-Robert
by savageautomate
Thu Jan 10, 2013 10:38 am
Forum: Java
Topic: Java GPIO Frequency Benchmarks
Replies: 35
Views: 19900

Re: Java GPIO Frequency Benchmarks

trouch wrote:Thanks for your post and blog article, it's a great complement to http://codeandlife.com/2012/07/03/bench ... pio-speed/
Thanks for that link! I had not seen that article.

Regards, Robert
by savageautomate
Thu Jan 10, 2013 1:04 am
Forum: Java
Topic: Java GPIO Frequency Benchmarks
Replies: 35
Views: 19900

Re: Java GPIO Frequency Benchmarks

thanks for precisions. I also choose to include native code in webiopi to get a full GPIO access through registers I recently made some bench with java too, and I'm considering porting webiopi server to java. But there is a big difference between 150KHz and 7Mhz ! How is compiled the native part ? ...
by savageautomate
Thu Jan 10, 2013 12:35 am
Forum: Java
Topic: Java GPIO Frequency Benchmarks
Replies: 35
Views: 19900

Re: Java GPIO Frequency Benchmarks

... Another approach that may avoid this JNI overhead, is by using Java to directly access the Raspian Linux file handle drivers to the GPIO interface using the RPi /sys/classes/gpio/* and Java File I/O. ... Hi Hinkmond, Thank you for your post and suggestions. The overhead of JNI certainly makes s...
by savageautomate
Wed Jan 09, 2013 7:38 pm
Forum: Java
Topic: Java GPIO Frequency Benchmarks
Replies: 35
Views: 19900

Re: Java GPIO Frequency Benchmarks

Pi4J initializes wiringPi using this method: wiringPiSetup() Thus is it not using the "/sys/class/gpio" interface but rather SoC registers directly. We choose this method in Pi4J because the "wiringPiSetupSys()" initializer has some pin export limitations and we wanted to provide a single and consis...
by savageautomate
Wed Jan 09, 2013 3:15 pm
Forum: Java
Topic: Java GPIO Frequency Benchmarks
Replies: 35
Views: 19900

Java GPIO Frequency Benchmarks

I posted an article on benchmarks of GPIO state change frequency running a java test program on different JVMs. The Oracle JVM turned out to the be clear winner in this speed test. See the full details here: http://www.savagehomeautomation.com/projects/raspberry-pi-java-gpio-frequency-benchmarks.htm...
by savageautomate
Tue Jan 08, 2013 5:57 am
Forum: Other projects
Topic: RPi integrated reset switch
Replies: 8
Views: 6157

Re: RPi integrated reset switch

I was able to install a small PCB push button momentary switch on my Raspberry Pi as a reset button connected to P6. Full article with links to parts and step-by-step instructions: http://www.savagehomeautomation.com/projects/raspberry-pi-install-a-momentary-reset-button.html http://www.savagehomeau...
by savageautomate
Wed Jan 02, 2013 12:31 am
Forum: Java
Topic: Folders of /opt/pi4j do not exist
Replies: 2
Views: 1464

Re: Folders of /opt/pi4j do not exist

If you need it, here are manual instruction to get Pi4J on your Pi:
https://groups.google.com/d/topic/pi4j/ ... discussion
by savageautomate
Tue Jan 01, 2013 11:54 pm
Forum: Java
Topic: Can the Pi run .jar files?
Replies: 10
Views: 42726

Re: Can the Pi run .jar files?

You are welcome and glad to have you with us :D
by savageautomate
Tue Jan 01, 2013 11:53 pm
Forum: Java
Topic: Folders of /opt/pi4j do not exist
Replies: 2
Views: 1464

Re: Folders of /opt/pi4j do not exist

There is a defect in the current installer package that will fail in some cases if the scripts cannot create or remove the expected folders:
Try the steps listed here to see if you can get a clean install of Pi4J:
https://github.com/Pi4J/pi4j/issues/25# ... t-11766950

Thanks, Robert
by savageautomate
Tue Jan 01, 2013 11:47 pm
Forum: Java
Topic: Pi4J now supports a stepper motor interface
Replies: 2
Views: 8851

Re: Pi4J now supports a stepper motor interface

malakai wrote:Awesome I may actually learn Java because of all your hard work. :)
Excellent!
Java is a very popular language for embedded platforms. It's been a lot of fun developing with it on the Pi : :mrgreen:
by savageautomate
Tue Jan 01, 2013 11:44 pm
Forum: HATs and other add-ons
Topic: John Jay's Stepper Motor Breakout Board
Replies: 1
Views: 1934

John Jay's Stepper Motor Breakout Board

I recently was able to get my hands on John Jay's stepper motor breakout board and in no time was able to have my Raspberry Pi controlling a motor. Full article with photos, sample code, and short video: http://www.savagehomeautomation.com/jj-stepper Stepper Motor & Breakout Board: http://mypishop.c...
by savageautomate
Tue Jan 01, 2013 11:38 pm
Forum: Java
Topic: Pi4J now supports a stepper motor interface
Replies: 2
Views: 8851

Pi4J now supports a stepper motor interface

I recently added support to Pi4J to control stepper motors. I created an interface similar to the Arduino stepper motor library: public interface StepperMotor extends Motor { float getStepsPerRevolution(); void setStepsPerRevolution(int steps); void setStepInterval(long milliseconds); void setStepIn...
by savageautomate
Sun Dec 30, 2012 8:33 pm
Forum: Java
Topic: Java
Replies: 3
Views: 2335

Re: Java

Hi, I got a Raspberry Pi for Christmas and I am trying to put Java on it.... See this forum post, it includes instructions for the OpenJDK and links to instructions for Oracle JDK http://www.raspberrypi.org/phpBB3/viewtopic.php?p=246090#p246090 If you are just starting out, I would suggest the Open...
by savageautomate
Sun Dec 30, 2012 8:28 pm
Forum: Java
Topic: Can the Pi run .jar files?
Replies: 10
Views: 42726

Re: Can the Pi run .jar files?

Oh, one other thing to note that is you can install multiple JVMs on your system such as OpenJDK 7 and Oracle JDK SE 8 early access and then switch between them as needed/desired. Check out this how-to article for switching between JVMs on Debian/Raspbian: http://www.savagehomeautomation.com/project...
by savageautomate
Sun Dec 30, 2012 8:25 pm
Forum: Java
Topic: Can the Pi run .jar files?
Replies: 10
Views: 42726

Re: Can the Pi run .jar files?

The explanation on the downloads page is a bit misleading when it says about the JVM. I'm still not sure exactly what that is. ... just to clarify what the downloads page is talking about ... You can use the OpenJDK on any of the Linux distributions available. It's easy to install and already avail...
by savageautomate
Sun Dec 30, 2012 5:34 pm
Forum: Java
Topic: Pi4J hard float dpkg issue
Replies: 2
Views: 1862

Re: Pi4J hard float dpkg issue

I am not familiar with how to debug "dpkg", but you can also just download the .zip package and create the directory manually and unpack the zip. Just make sure to grab 0.0.5-SNAPSHOT for supporting Oracle JDK SE 8. I encountered a similar issue today where I could not install a Pi4J .deb package o...
by savageautomate
Fri Dec 28, 2012 3:36 pm
Forum: Java
Topic: java.io.IOException: Invalid argument
Replies: 6
Views: 4262

Re: java.io.IOException: Invalid argument

Hi Micheal, I fully agree with your comment about understanding the mechanics of a framework, but the OP mentioned that they were a "novice developer" so starting with a framework to get up and running may prove more fruitful and then go back and learn how it works under the covers after accomplishi...

Go to advanced search