We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm working on a project that uses GPIO output. The pins aren't getting power. Here's that part of the code:
import processing.io.*;
void setup()
{
GPIO.pinMode(5, GPIO.OUTPUT);
}
void draw()
{
GPIO.digitalWrite(5, GPIO.HIGH);
}
I know the code doesn't do much, but from what I understand, there should be 3.3 volts coming from pin 5 as a result of that code. The 5V power pins aren't even getting power. What's going on here?
Answers
Using the following code should be more effective for debugging. By using a mouse action, you can switch btw high and low states, instead of only testing for high in draw.
How are you measuring the voltage across the pins?
The following code is not tested but it should run beside minor typos, if any. I have to add I don't have experience with these boards. How are you communicating to it? If it is an external board, should you be interacting with it via serial?
Kf
Something else to consider: the number 5 refers to GPIO 5, not the physical pin 5 on the pin header.
See the pinout.
Forget about my comment in serial. I guess you don't need it since you are in a Raspberry pi.
Kf
Thank you everyone. Problem solved. We had an insufficient power supply.