I am using the pi4j library to control the gpios on the raspberry pi B, but I ran in the following problem: when I start a pi4j example like ControlGpioExample.java then the led(with resistor 220 ohm) or DC motor on the breadboard don't react at all.
Trying to isolate the problem, I've made the following observations:
- when I test the example with an small audio-buzzer curcuit on the breadboard then it works fine.
- when I connect the led or DC-motor directly with power(3.3V on pin 1) and ground(pin 6) it works fine aswell.
- I used wiringPi's command
gpio readallto read the gpio state. When GPIO 1(pin12) is wired to a led or DC-motor I can't change its state to high with command
gpio write 1 1. When I type
gpio readallagain it shows me that GPIO 1 is still on low(0), but with the audio-buzzer curcuit it works without problems.
I tested it on two different raspberry pi's, breadboards, libraries(pi4j and rpi.gpio), exchanged cables and reinstalled raspbian, the problem is still existing. Maybe I am missing something so I hope you can help me out.