Go to advanced search

by snooty
Wed Jan 04, 2017 9:17 am
Forum: Automation, sensing and robotics
Topic: Wired doorbell to Pi, keeping doorbell functionality?
Replies: 9
Views: 4067

Re: Wired doorbell to Pi, keeping doorbell functionality?

An alternative is to use a small relay powered by the doorbell to switch the GPIO. thanks for the reply, what type of relay would I need for this? You need to measure the output voltage from your doorbell transformer when the bell's coil is energised. Once you know that voltage you can pick a suita...
by snooty
Tue Jan 03, 2017 11:20 pm
Forum: Automation, sensing and robotics
Topic: Wired doorbell to Pi, keeping doorbell functionality?
Replies: 9
Views: 4067

Re: Wired doorbell to Pi, keeping doorbell functionality?

rpdom wrote:An alternative is to use a small relay powered by the doorbell to switch the GPIO.
thanks for the reply, what type of relay would I need for this?
by snooty
Tue Jan 03, 2017 11:05 pm
Forum: Automation, sensing and robotics
Topic: Wired doorbell to Pi, keeping doorbell functionality?
Replies: 9
Views: 4067

Re: Wired doorbell to Pi, keeping doorbell functionality?

You can't wire that doorbell to a Raspberry without some isolating electronics. Your doorbell runs at 8-16V AC. Your RPi runs at 5V DC and the ARM chip on it (and the GPIO) runs at 3V3 DC. You probably need to rectify the AC voltage to DC first then get that to switch a bipolar or mosfet transistor...
by snooty
Tue Jan 03, 2017 10:22 pm
Forum: Automation, sensing and robotics
Topic: Wired doorbell to Pi, keeping doorbell functionality?
Replies: 9
Views: 4067

Wired doorbell to Pi, keeping doorbell functionality?

Hi, Sorry if this has been discussed before but I have zero confidence in myself with anything electrical. Below is the wired doorbell in my house: http://i.imgur.com/KirTFsn.jpg How exactly would I go about connecting the doorbell button to the raspberry pi GPIO and use it as an input whilst also a...
by snooty
Wed Dec 19, 2012 10:26 pm
Forum: Java
Topic: start a jar when x11 starts?
Replies: 2
Views: 3396

Re: start a jar when x11 starts?

should've did more googling before posting

cd /etc/xdg/lxsession/LXDE
nano autostart
add @java -jar "path/name.jar"

works fine
by snooty
Wed Dec 19, 2012 8:46 pm
Forum: Java
Topic: start a jar when x11 starts?
Replies: 2
Views: 3396

start a jar when x11 starts?

Can anyone please tell me how to start my java gui when x11 starts? I'm automatically starting x11 as root with rc.local - su root -c startx I've tried 2 ways so far with no luck: Put a new shell script in /etc/init.d/ #! /bin/sh java -jar "home/pi/myGui.jar" Then chmod +x /etc/init.d/myScript updat...
by snooty
Mon Dec 17, 2012 9:21 pm
Forum: HATs and other add-ons
Topic: PiFace instructions?
Replies: 9
Views: 16867

Re: PiFace instructions?

Hi Olly,

Thanks for the reply and the info, hopefully that will get me started with the piface. I had to use the debian soft-float image to use java for controlling the gpio, so I suppose that raspbian image created for the piface isn't going to work with java?
by snooty
Mon Dec 17, 2012 1:55 am
Forum: HATs and other add-ons
Topic: PiFace instructions?
Replies: 9
Views: 16867

PiFace instructions?

Hi, Myself and a friend have been playing around with the raspberry pi and are thinking of using it for a few things, he ordered a piface to use with the pi. The only problem is that we have no clue how to use it, it came with no documentation and I can't find anything useful except for some info ab...
by snooty
Mon Dec 17, 2012 1:44 am
Forum: Java
Topic: Persistent Storage?
Replies: 5
Views: 3558

Re: Persistent Storage?

thanks for the replies, it seems simple writing to and reading from a text document seems to be fine
by snooty
Fri Dec 14, 2012 8:16 pm
Forum: Java
Topic: Persistent Storage?
Replies: 5
Views: 3558

Re: Persistent Storage?

Yup anything, Firstly I need a running count of the input pulses received from the gpio, I have 7 input pins I want want to count the pulses from separately. I also want to keep a text log of the last 10 or 20 actions that have occurred, as simple as: 1 - input pin 16 received..... output to pin 6 ....
by snooty
Fri Dec 14, 2012 5:51 pm
Forum: Java
Topic: Persistent Storage?
Replies: 5
Views: 3558

Persistent Storage?

Hi, I'm just wondering what is the best method to store an integer or string persistently, so that it will be available to a java program after a reboot? If there was an equivalent of html5 local storage for java it would be perfect. I'm thinking the correct thing to do would be writing whatever I n...
by snooty
Thu Dec 13, 2012 3:13 pm
Forum: Java
Topic: pi4j in a jar?
Replies: 14
Views: 6203

Re: pi4j in a jar?

You can also see in the "Execute" section of this page what command line argument I use to reference the Pi4J library when starting a Java program on the Pi. http://pi4j.com/example/control.html I'm using 0.03, I did try that earlier but to be honest it was just a stab in the dark and I was probabl...
by snooty
Thu Dec 13, 2012 3:08 pm
Forum: Java
Topic: pi4j in a jar?
Replies: 14
Views: 6203

Re: pi4j in a jar?

it's working, delighted :D

Thanks for taking the time Chris.

Stupidly I had pi4j in the same folder as the jar on the pi but I moved the pi4j jar into a lib folder in netbeans, so the final thing was to move pi4j into /lib folder on the raspberry pi.
by snooty
Thu Dec 13, 2012 2:17 pm
Forum: Java
Topic: pi4j in a jar?
Replies: 14
Views: 6203

Re: pi4j in a jar?

I'm trying to upload screen shots of my filesystem and what is in the jar file but it's not happening I can't build anything with the ant script because of the error: /Users/Me/NetBeansProjects/TestMachine/build.xml:14: /dist/lib does not exist. TestMachine build.xml build dist/testMachine.jar dist/...
by snooty
Thu Dec 13, 2012 1:31 pm
Forum: Java
Topic: pi4j in a jar?
Replies: 14
Views: 6203

Re: pi4j in a jar?

I went ahead and replaced <property name="lib" value="../lib" /> with <property name="lib" value="../TestMachine/build/lib" /> and more errors have occurred.. run: Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/rj/qt8zbh7517q716xmgxr018x00000gn/T/libpi4j.so: dlopen(/...
by snooty
Thu Dec 13, 2012 1:22 pm
Forum: Java
Topic: pi4j in a jar?
Replies: 14
Views: 6203

Re: pi4j in a jar?

Thanks for all that Chris, I'm grateful for the help :D I'm trying to follow it now but I'm getting an error: /Users/Me/NetBeansProjects/TestMachine/build.xml:14: /Users/Me/NetBeansProjects/lib does not exist. Do I need to change something in your build xml code to direct it to the projects lib fold...
by snooty
Thu Dec 13, 2012 12:29 pm
Forum: Java
Topic: pi4j in a jar?
Replies: 14
Views: 6203

pi4j in a jar?

Hi, I've got a simple java program using pi4j running without a gui, so I made a little gui for it in netbeans. The built jar file runs fine on the raspberry pi, until I try to import pi4j to the libraries of the gui project and use it. I get this error on the pi: [email protected] ~ $ java -jar "TestM...
by snooty
Wed Dec 12, 2012 10:12 pm
Forum: Python
Topic: RPi.GPIO Listen for inputs - method and handling repetition?
Replies: 3
Views: 2690

RPi.GPIO Listen for inputs - method and handling repetition?

Hi all, I'm using python / RPI.GPIO to read six buttons, I'm doing this the way I've found in a few code samples: root.after(5, button_check1) root.after(5, button_check2) root.after(5, button_check3) root.after(5, button_check4) root.after(5, button_check5) root.after(5, button_check6) def button_c...
by snooty
Fri Dec 07, 2012 6:58 pm
Forum: Other programming languages
Topic: pi4j simple for loop
Replies: 5
Views: 2622

Re: pi4j simple for loop

Thanks for the replies and the education. In the meantime I went with the simple option avoiding loops, shown below. fiveInput.addTrigger(new GpioCallbackTrigger(PinState.HIGH,new Callable<Void>() { public Void call() throws Exception { System.out.println(" --> Received 5 input, outputting 5 x 1 out...
by snooty
Wed Dec 05, 2012 9:16 pm
Forum: Other programming languages
Topic: pi4j simple for loop
Replies: 5
Views: 2622

pi4j simple for loop

Hi everyone, Can someone please put me out of my misery please, I haven't been near plain java in about 5 years and I'm trying to alter the pi4j trigger example http://pi4j.com/example/trigger.html a little bit to pulse the led 4 times. I was just trying to insert a for loop to do this but I can't s...
by snooty
Thu Nov 22, 2012 1:08 pm
Forum: Other programming languages
Topic: pi4j momentary switch?
Replies: 5
Views: 4387

Re: pi4j momentary switch?

So I tried to follow your advice but it still won't work. I've uploaded some actual images instead of the one from the kit website as the resistors appear to be different, I should've did that at the start. Album http://imgur.com/a/6gEDN http://i.imgur.com/pEUikh.jpg http://i.imgur.com/QJu3Kh.jpg
by snooty
Thu Nov 22, 2012 12:00 pm
Forum: Other programming languages
Topic: pi4j momentary switch?
Replies: 5
Views: 4387

Re: pi4j momentary switch?

ok, I'm gonna have a go again now.

thanks, for the help. much appreciated.
by snooty
Thu Nov 22, 2012 3:34 am
Forum: Other programming languages
Topic: pi4j momentary switch?
Replies: 5
Views: 4387

pi4j momentary switch?

Hi everyone, I wasn't too sure where to put this but I thought as it's pi4j related here might be best. I'm messing around with the examples on the pi4j website in preparation for a project I want to try, the only problem is my programming is alright but I have no clue about electronics. I'm looking...

Go to advanced search