Thanks again for the reply.
If you are going to use Vin then your power supply has to be set between 7 and 9V inorder to supply 5V out of the regulator.
Turns out I was using 5V. I just let myself get confused.
Which means that the pin 4 input is not being driven correctly. The schematic shows pin 4 being connected to an IR diode that connects direct to ground. So Pin 4 will never see a voltage greater than about 1.6V, because that is the forward voltage of an IR LED. So Pin 4 will always read as a LOW.
Oh. I assumed any voltage above 0 would trigger a state change on any input pin. In review, it seems kinda pointless to try and detect state changes in that diode anyhow; this particular diode is always on and wouldn't look particularly good on my blinkenlights display. However, there is a detector diode that goes high every time it senses an IR pulse. If I wanted to detect a state change in that one, how might I do it?
Does the mysterious F-board contain a current limiting resistor? If not then not only will this input not work but you could be damaging something on the board.
Thanks for asking, and there are current-limiting resistors on the board. If I did fry an F Board (and I have), I have others ready to go. To be specific, the F Board is a 1998 Furby's main board. I'm attempting to read state changes of differing components on the Furby and have it reflected in an array of LEDs.
Note that you show the ground connected to the F-board but you have not shown the negative output of the thing driving both Arduino pins connected to ground. Are these at the same potential as the ground?
I should have specified. Everything that is shown as ground on my schematic is really going to -V. These should have the same potential as ground, but sometimes I forget my fundamentals.
So I've messed around some more. The two components I am trying to read state changes for are a simple cam switch and the motor. The code has changed slightly as well.
void setup() {
pinMode(13, INPUT);
pinMode(12, INPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
//Pin 13 Input controls Pin 3 Output. Pin 12 Input controls Pin 2 Output.
}
void loop() {
if (digitalRead(13) == HIGH) {
digitalWrite(3, HIGH);
} else {
digitalWrite(3, LOW);
}
if (digitalRead(12) == HIGH) {
digitalWrite(2, HIGH);
} else {
digitalWrite(2, LOW);
}
}
The schematic of my first configuration and results can be seen here:
So I'm essentially having the same issue as before. L1 toggles on and off with the motor while L2 does not toggle when the cam switch is closed.
I added a second Nano with the above code to see what would happen:
Here, both LEDs function as they should. I tried hooking up D12 and D2 to the second Nano, and even then, D2 is always high. The strange thing is that on both Nanos, Pin 2 is high regardless of input from D12. I'll triple check for shorts and look for mistakes in translating my schematic, but it would be the third time I've done so. Any thoughts?