Go to advanced search

by clicky
Fri Mar 27, 2015 9:48 pm
Forum: Java
Topic: MCP3424 pi4j
Replies: 7
Views: 3998

Re: MCP3424 pi4j

Here's an example:
https://github.com/Pi4J/pi4j/blob/mast ... ample.java

Let me know if you get stuck anywhere...
by clicky
Fri Mar 27, 2015 9:46 pm
Forum: Java
Topic: Pi4j - i2cdetect programmatically
Replies: 8
Views: 1931

Re: Pi4j - i2cdetect programmatically

I'm pretty sure that i2cdetect does quite similar thing. It would be interesting finding the code of it. If there's better, faster way to do so - we can always implement it in pi4j...
by clicky
Thu Mar 26, 2015 2:55 pm
Forum: Java
Topic: Pi4j - i2cdetect programmatically
Replies: 8
Views: 1931

Re: Pi4j - i2cdetect programmatically

Yes, but it would be a bit clunky and possibly slow. On the other hand i2cdetect is not particularly fast either. You would need to try each address separately and guard results with try/catch... Where it doesn't fail - you'll have a device attached to that address. I've just checked - it should hav...
by clicky
Thu Mar 26, 2015 9:25 am
Forum: Java
Topic: Retrieving data from mySQL database using Java
Replies: 10
Views: 5067

Re: Retrieving data from mySQL database using Java

Here's another tip - if you can't set up RPi's DNS in any other way, you can use hosts file (on windows usually lives in C:\Windows\System32\drivers\etc\hosts (first link google gave me how to edit it: http://helpdeskgeek.com/windows-7/windows-7-hosts-file/ ) and store domain name of RPi along with ...
by clicky
Tue Mar 24, 2015 10:08 am
Forum: Java
Topic: (newbie) building pi4j from maven
Replies: 7
Views: 7086

Re: (newbie) building pi4j from maven

Nice! BTW you might want to check http://remotevm.abstracthorizon.org/ and adopt it to NetBeans. With agent running on the RPi and adding client to your class path (run config only) - you can run code directly of Pi without need of manual copy of everything. Since you're already nicely compiling stu...
by clicky
Fri Mar 13, 2015 8:14 am
Forum: Java
Topic: Comparing Maven, Gradle and Ant.
Replies: 11
Views: 4829

Re: Comparing Maven, Gradle and Ant.

Idea of RAM disk is nice, but I always though that OS like Linux does manage disk cache really effectively. I have confirmed it with trying to deploy one system on JBoss (2.5+GB) from different mediums. First ordinary HD, SSD and ram disk. It turns out that SSD and ram disk didn't show any differenc...
by clicky
Tue Mar 10, 2015 5:53 pm
Forum: Java
Topic: Comparing Maven, Gradle and Ant.
Replies: 11
Views: 4829

Re: Comparing Maven, Gradle and Ant.

I see. As you said - it seems that RPi is quite unsuitable for the task. Ant itself might do the job, but only if you have all other dependencies already downloaded and prepared. Maven, on the other hand, would be preferable solution as it does all the dependency resolution and build automatically f...
by clicky
Tue Mar 10, 2015 12:46 pm
Forum: Java
Topic: Comparing Maven, Gradle and Ant.
Replies: 11
Views: 4829

Re: Comparing Maven, Gradle and Ant.

Solution is quite simple: don't create jars on Pi! :)

Use any (Maven/Gradle/etc) on your PC and transfer final Jar back to Pi.
by clicky
Mon Mar 09, 2015 11:32 am
Forum: Java
Topic: RPi 2 performance
Replies: 9
Views: 5079

Re: RPi 2 performance

Thanks. Also, I think I've read somewhere that ARM7 has better support for JVM than ARM6 and should offer some performance improvements... And that original JVM is capable of using those enhancements out of the box. Now, what enhancements are those I forgot... O: )
by clicky
Thu Mar 05, 2015 10:39 am
Forum: Java
Topic: Remote Java programming
Replies: 15
Views: 10944

Re: Remote Java programming

Again - feature of your HTTP server is pretty cool. But I think you're mixing * development * and * deployment *. In first case you need really quick turnaround between change and seeing result - they way we used on in our IDE: change the class, press run, see the result, react on it and repeat. Dep...
by clicky
Thu Mar 05, 2015 10:17 am
Forum: Java
Topic: Remote Java programming
Replies: 15
Views: 10944

Re: Remote Java programming

See, that's the main issue: you need to jar your stuff before hot-deploying them. Unlike that, remotevm project (and probably LaunchPi) does different thing: you run your development from your IDE from a laptop/PC and remotevm client in collaboration with remotevm agent transfer only changed files a...
by clicky
Thu Mar 05, 2015 9:44 am
Forum: Java
Topic: Remote Java programming
Replies: 15
Views: 10944

Re: Remote Java programming

Fair enough. But there's a difference between fully pledged, stand alone java app vs specific app container. If you are making your own java app then there's different approach to developing for your app container. Also - there's a question how do you prepare your classes for hot deployment and deli...
by clicky
Fri Feb 27, 2015 1:09 pm
Forum: Java
Topic: Jar file on Pi
Replies: 2
Views: 4072

Re: Jar file on Pi

If you are using some other libraries, then 'standard' (old) way is to copy all dependent libraries to Pi as well and start jar using something like: java -classpath yourmain.jar:lib1.jar:lib2.jar:lib3.jar... MainClassName Alternatively if you have created 'executable' jar then java -classpath lib1....
by clicky
Sun Feb 22, 2015 7:11 pm
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

Glad we could help! :) It makes far more sense having that extra simple method. Next time check the source out (from github would be the best, but source jar would work, too) and if you have improvements like that in mind - submit a change back to us! It is, after all, social, open source code, isn'...
by clicky
Sun Feb 22, 2015 5:29 pm
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

Robert has already picked it up and fixed it. You can try again. It should work now! O : )
by clicky
Sun Feb 22, 2015 12:37 pm
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

Sorry - my mistake. I didn't try out the fix I had. I've sorted it out but give me a moment to test it. I'll post it here, sometime today, when it is ready.
by clicky
Fri Feb 20, 2015 3:47 pm
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

Done (thanks to Robert). You can pick the latest from: http://pi4j.com/download.html There you'll find that com.pi4j.io.gpio.RaspiPin has static method getPinByName(String) where name is as defined in that class (check the source file) and is in format like: "GPIO 0", "GPIO 1", ....
by clicky
Wed Feb 18, 2015 4:07 pm
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

In that case I can send you 1.0-SNAPSHOT files so you can replace 0.0.5 ones with the latest.
I've just re-built it on my Pi (remotely).

Ideally I would like to see them in maven repo of some kind... (I'll be working on it now)
by clicky
Wed Feb 18, 2015 2:02 pm
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

If you don't mind building pi4j from source code - checkout develop branch and build it yourself. The method above is just pushed back in.

Alternatively - let me know how you created your project and we can think of something.
by clicky
Wed Feb 18, 2015 11:01 am
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

You know what - even reflection of RaspiPin is not quite right. If you can to hold off your implementation and you don't mind taking the latest snapshot - I'll go tonight and add new method along the lines of: public class RaspiPin { public static Pin getPinByName(String name) { ... } ... } where na...
by clicky
Wed Feb 18, 2015 10:24 am
Forum: Java
Topic: Assign pi4j pins from text data?
Replies: 17
Views: 3283

Re: Assign pi4j pins from text data?

Well done. :) Only thing I wouldn't insist of doing is where you already have your class (SomeGPIOInput) - you can design special method like: public void setPin(String name, GpioPinDigitalInput pin) { if ("switchPin".equals(name)) { switchPin = pin; } if ("triggerPin".equals(nam...
by clicky
Tue Feb 17, 2015 4:35 pm
Forum: Java
Topic: Raspivid stream to a java panel questions
Replies: 2
Views: 1549

Re: Raspivid stream to a java panel questions

Definitively interesting question.

No answers - nor time to find time (sorry O: ), but I do have more questions: did you try to pass/wrap/adapt System.in for jvlc - so it reads it instead of a file?
by clicky
Tue Feb 17, 2015 3:52 pm
Forum: Java
Topic: Remote Java programming
Replies: 15
Views: 10944

Re: Remote Java programming

by clicky
Wed Feb 11, 2015 8:26 am
Forum: Java
Topic: Jar on Raspberry Pi not responding after a long time
Replies: 10
Views: 2173

Re: Jar on Raspberry Pi not responding after a long time

Just be careful that SD cards do have limited amount write cycles and I am not sure how well Linux drivers are equipped with logic not to wear out single storage block and scatter writes over the medium. As I originally said - what if SD card is to be blamed for slowing down and some odd behaviour? ...
by clicky
Tue Feb 10, 2015 8:34 pm
Forum: Java
Topic: RPi 2 performance
Replies: 9
Views: 5079

Re: RPi 2 performance

As completely ignorant in the matter - I though that JVM for ARM (deployed to RPi as well as some other ARM platforms) is already capable of utilising ARM7 instruction set (and its Java extension) when/if available. There is no need for extra 're-compilation' for platform. Generally speaking JVM (at...

Go to advanced search